From Mic Nowland
Answered By Dan Wilder
I have a couple of machines named Lin and winy on my local network myplace.net.au connected to my RH6.1 NAT/Firewall, samba server, squid cache with caching DNS and using a part-time dialup connectin to my ISP myisp.com.au
Local2remote works fine, Qmail will rewrite the domain in From: field by setting QMAILHOST=myisp.com.au and QMAILINJECT=f in my enviroment no probs.
Emails from Lin@myplace.net.au addressed to email@example.com get sent,noprobs there either. However, I cannot get qmail to rewrite the From: field to Lin@myisp.com.au when I send email from either Lin or winy to say firstname.lastname@example.org it remains Lin or winy @myplace.net.au, which is wrong.
Do I need to use mess822 (gulp) or what ? Please help, I am at my wits end. Michael
[Dan] There's probably a way to do it using Qmail, but sad to say, I haven't a clue, as my relationship with Qmail lasted only about two weeks.
You might consider asking your MUA (Mail User Agent, your email client) to use correct "From:" headers in the first place. Most MUAs now are able to adapt to working on private networks, where email headers should always reflect reachable addresses, not private ones.
Another possibility would be switching over to Postfix. In my admittedly limited experience, Postfix is much easier to configure than Qmail, and it will certainly do any reasonable header rewrite you might need.
Postfix will do the particular rewrite in question if you add the following line to /etc/postfix/main.cf:
masquerade_domains = $mydomain
The line is taken from /etc/postfix/sample-rewrite.cf, installed by "make install".
This simplicity is typical of Postfix configuration.
P.S. Postfix does Maildir delivery quite nicely, if you ask it to.
|1 2 3 4 6 7 9|
|11 12 15 16 18|
|20 22 24 25 26 28 29|