Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Qmail: users

Resend forward-mails in queue to another adresse -> HOWTO

 

 

Qmail users RSS feed   Index | Next | Previous | View Threaded


dirk at gablers-online

Nov 9, 2009, 4:35 AM

Post #1 of 3 (1616 views)
Permalink
Resend forward-mails in queue to another adresse -> HOWTO

Hi,

I have some emails in the queue which were sent to an address "A" on my
server which was configured as an forward to another email address on
server "B"
This other server "B" is not available anymore and I've changed the
forward address for "A" to another one ("C" )

If and how can I now force the mails in the queue be resend but
forwarded to the new address "C" ? They are still in the queue for the
old forward address.

Looking forward to your answers.

Cheers,
Dirk


kyle-qmail at memoryhole

Nov 9, 2009, 8:50 AM

Post #2 of 3 (1468 views)
Permalink
Re: Resend forward-mails in queue to another adresse -> HOWTO [In reply to]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On Monday, November 9 at 01:35 PM, quoth Dirk:
> If and how can I now force the mails in the queue be resend but
> forwarded to the new address "C" ? They are still in the queue for
> the old forward address.

Well, the way *I* would do it (there may be simpler ways) is to stop
qmail-send, edit the relevant files in the queue, then restart
qmail-send. Specifically, remote recipients are listed in the files in
/var/qmail/queue/remote/. Of course, that's a hashed structure in
there, so you'll need to figure out *which* files to edit, but in this
case, I imagine you can get away with `grep -rl "A"
/var/qmail/queue/remote`. Once you know which files to edit; edit
them! Be careful to preserve the correct formatting (these files do
not end in a newline, for example, and many text editors will secretly
add a newline to the end of all files; also, your recipient must be
prepended with the letter "T").

Anyway, that's a grungy, down-and-dirty way of doing it. I imagine
there's a cleaner way (perhaps with a tool of some sort).

~Kyle
- --
Suppose ye that I am come to give peace on earth? I tell you, Nay; but
rather division: For henceforth there shall be five in one house
divided, three against two, and two against three. The father shall be
divided against the son, and the son against the father; the mother
against the daughter, and the daughter against the mother; the mother
in law against her daughter in law, and the daughter in law against
her mother in law.
-- Prince of Peace, Jesus Christ (Luke 12:51-53)
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!

iQIVAwUBSvhIciuveozR/AWeAQjRtQ//WE3IOIF7WuZVlxKG7xhGFAEeCZKg7bmp
eDdEf+OxzWJRBB6J460yHaYvQY5doUIePFZYPA/zH1ffM+Mi93pEOpdhPstxDJsI
ADMwfca8mgnyVbMWoS0ChgHGBuRyO3b/Mw3kcxMPE34A9LD8rdXQa7hfsJUdaFqv
EYP8bin8zmMPcoC0Ru6BbhuGtJjTddbim4i+kxBLqV19jdwtL+YO4spkNBSla/jC
4v9GM4q37kO7t7GNIee/6MqoXCQLwO+eIgf0ycI9rWnuuLEHC2MeMsdRNQBdzP2N
QKvKYQqUo8zxV9XnvDc9S5V+AWsa55hGTsxBSl8qy/AG6OmHPM9iaq/cyDLVIv2M
GecJeCwBSZa6bw+x9p/IA3Ba16/2PHF2JR+bHOISXAZS8kM2QX2gARCRsfMvdXQV
78uL6UKuhKbPIDU4YWRZ1Gs+C+iRQXkN3ST5uWZndzPNcUVzo125mSeTRNNeNA5s
9x0/drItJYeM0MjZOcYGeul2RKd60+SoLGQelQehl771eY76apOhB+phBDfLbUZk
dKC+8cjXK6VWsfLfPpf4CbXGQPqjg3oq7D/+n58SQYGPmFmlnUDUY2aqos0izkhl
YghtTXQbfl8z19VZ/qh0UgOO6TfSbF3XerANvrtAQ7KjUy/VHyFwRTrv/ZtN4Ze/
gvfeFfiID1A=
=zTi2
-----END PGP SIGNATURE-----


lists-qmail at maexotic

Nov 9, 2009, 9:19 AM

Post #3 of 3 (1479 views)
Permalink
Re: Resend forward-mails in queue to another adresse -> HOWTO [In reply to]

On Mon, Nov 09, 2009 at 10:50:58AM -0600, Kyle Wheeler wrote:
> Well, the way *I* would do it (there may be simpler ways) is to stop

*g* "Don't try this at home, Kyle is an expert!" ;-)

While this is an elegant way worth fir a real qmail hacker, I usually prefer
(even more with some 100 messages in the queue) the somehow more
conservative way :-)

I'd
- add the domainof(B) to the control/virtualdomains file.
- create a .qmail-userpart(B) for that domain with "C" as a forward address.
- svc -h /service/qmail-send
the problem now is that the messages are in the remote queue and we need
them in the local queue, so we just loop it through the server:
- add to control/smtproutes
domainof(B):127.0.0.1
- svc -a /service/qmail-send

after the mails are gone from the queue you can remove the virtualdomain
and smtproute entry, do a svc -h /service/qmail-send and you're done ;-)

\Maex

Qmail users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.