Friday, January 24, 2014

Sender address rejected: Domain not found - outgoing mail settings with Postfix


A staging server called "", with no DNS record pointing to it.
Trying to send email from there to myself (


$ echo foo | mail -s bar
$ tail /var/log/mail.log
Jan 24 18:30:24 tst postfix/smtp[26306]: 46D8FC2584: to=<me@my-mail>,[]:25, delay=0.61, delays=0.02/0.01/0.45/0.13, dsn=5.1.8, status=bounced (host my-mail[] said: 554 5.1.8 <>: Sender address rejected: Domain not found (in reply to RCPT TO command))


$ cat /etc/hostname
This is the FQDN (fully qualified domain name), and Postfix appends it to the local user name.

What we want

We'd like Postfix to append only the and not the

A solution

(figured out by reading
# vi /etc/postfix/
(add this line:)
masquerade_domains =
Restart Postfix
# postfix stop && postfix start

Saturday, January 4, 2014

Could not open input file: /cygdrive/c/PHP/phpunit (PHP under Cygwin)

The problem:

$ /cygdrive/c/PHP/php.exe /cygdrive/c/PHP/phpunit
Could not open input file: /cygdrive/c/PHP/phpunit


MS Windows


While started in Cygwin, php.exe will be run in Windows environment, which does not know how to translate /cygdrive/c to C:\


Use a wrapper script
(Originally published by aefxx here)