Posts Tagged ‘domain mail’

How to change Return Path variable in Qmail

Friday, July 1st, 2011

Reading Time: < 1minute
The Return Path variable on one of the qmail mail servers I manage was improperly set.
New newsletter mails initiated by the php scripts on the mail server had the improper return path set in the mail headers, like so:

Return-Path: <>

Therefore many mail servers dropped messages as the set Return Path variable in the headers was incorrectly set to the domain

Thus to change the Return Path to the correct one that should have been I had to include in qmail’s control file /var/qmail/control/bouncehost, e.g.

root@qmail:~# echo '' > /var/qmail/control/bouncehost
root@qmail:~# echo '' > /var/qmail/control/doublebouncehost

By the way the return path in qmail is set by:

> qmail-inject and qmail-send

There seems to be also some way to ovewrite the default set return-path variable with some php variables but I have never tried this one.
Cheers 😉