Page 1 of 1

Postfix woes

Posted: Fri Nov 09, 2012 5:08 am
by modem7
Hey guys,

Got a bit of a problem w/ postfix, unsure if you can help?

When trying to send emails from fail2ban for example (custom "from" address I guess), I get the following problem:
Nov 9 11:55:18 AlexServer postfix/local[7938]: 4EC8FA15AB: to=<fail2ban@AlexServer.localdomain>, relay=local, delay=0.11, delays=0.04/0/0/0.06, dsn=5.1.1, status=bounced (unknown user: "fail2ban")
However, if I try to do an echo test | mail modem7@gmail.com I get the following:
Nov 9 12:03:53 AlexServer postfix/local[8785]: 3AD4FA15A1: to=<root@AlexServer.localdomain>, relay=local, delay=0.12, delays=0.05/0.02/0/0.05, dsn=2.0.0, status=sent (forwarded as 4BAC2A082C)
So it does seem to "work", but not if I have a custom "from" address.

Unsure if you guys can assist with setting up postfix so that I can define a "from" address without adding users every single time?

Here is my postconf -n:
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
html_directory = no
inet_interfaces = localhost
inet_protocols = all
local_recipient_maps =
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.7.7/README_FILES
relayhost = smtp.aquiss.net
sample_directory = /usr/share/doc/postfix-2.7.7/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
unknown_local_recipient_reject_code = 450
Many thanks!

Re: Postfix woes

Posted: Fri Nov 09, 2012 6:04 am
by bigfoot65
Edit the fail2ban config file and change the user it comes from to root. Then restart and do a test.