Showing posts with label UNIX server administration. Show all posts
Showing posts with label UNIX server administration. Show all posts

2014-01-24

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

Environment:

A staging server called "tst.myserver.com", with no DNS record pointing to it.
Trying to send email from there to myself (me@my-mail.com)

Problem:

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

Explanation:

$ cat /etc/hostname
tst.myserver.com
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 myserver.com and not the tst.myserver.com

A solution

(figured out by reading http://www.postfix.org/ADDRESS_REWRITING_README.html)
# vi /etc/postfix/main.cf
(add this line:)
masquerade_domains = myserver.com
Restart Postfix
# postfix stop && postfix start

2011-08-08

PHP on FreeBSD : Segmentation fault: 11 (core dumped)

PHP started dumping core after I upgraded MySQL to 5.5.
Everything worked fine, but a core was dumped every time, probably at the exit.

The solution was to rebuild PHP with the
"LINKTHR Link thread lib (for threaded extensions)"
option.

Later, I found a confirmation in this post

2010-07-05

nmap "error MD2 is disabled" workaround

NOTE: this is NOT a solution. It's a quick workaround.

Environment:
FreeBSD 7.2-RELEASE

openssl-1.0.0_2 (installed)
nmap-5.21_1 (to be installed)

Symptoms:
# cd /usr/ports/security/nmap
# make
Error: .... error MD2 is disabled ....

Workaround:

Add to /etc/make.conf:
WITHOUT_SSL=yes

This worked for me because I did not need SSL support in nmap.

2010-02-02

Postfix error -- connect to transport private/smtp: Connection refused

Problem:

Cannot send out any email, except to local users

Environment:

UNIX (Linux, FreeBSD, etc)
Postfix

Symptoms:

/var/log/maillog has these messages:
warning: connect to transport private/smtp: Connection refused

Reason:

"unix" smtp is disabled in Postfix configuration

Fix:

Uncomment this line in master.cf
smtp unix - - n - - smtp
(there are two more lines about smtp - they deal with external connections. Need them only if you want to accept mail from outside, not to send mail)

Additional thing to check:

mailer.conf should look like this:

$ cat /etc/mail/mailer.conf
#
# Execute the Postfix sendmail program, named /usr/local/sbin/sendmail
#
sendmail        /usr/local/sbin/sendmail
send-mail       /usr/local/sbin/sendmail
mailq   /usr/local/sbin/sendmail
newaliases      /usr/local/sbin/sendmail