I'm having "postfix Traumatic Stress" trying to get email running on a new server. I installed the
Problem 1: when I run "
It was unhappy with the line:
(there should be a law against "syntax error" when a piece of software was no doubt looking at a very specific aspect of the input)
If I remove that line, there are no errors.
This was from a very compact aliases file:
Problem 2:
While I have these two lines in my main.cf that should say where the alias file is:
and they verify if I do a
The same file, if moved to /etc/aliases gets the above "syntax error" errors.
However the errors in the maillog file when email comes in to
I don't know why the /etc/aliases is being used instead of the file specified in the alias_maps parameter.
At day 3 working on this, it was time to ask for help.
/usr/local/etc/postfix/main.cf
and master.cf
that worked on the production server on the new server.Problem 1: when I run "
newaliases
", I get this output:
Code:
# newaliases
aliases line 13: syntax error
newaliases: could not parse aliases file `/etc/aliases': No error: 0
It was unhappy with the line:
Code:
mail_to_program: "| /usr/local/www/data/program_that_takes_the_email"
If I remove that line, there are no errors.
This was from a very compact aliases file:
Code:
root: myname
# Basic system aliases -- these MUST be present
MAILER-DAEMON: postmaster
postmaster: root
freebsd-daily-report: myname
admin: myname
administrator: myname
Code:
# trap decode to catch security attacks
decode: root
devnull: /dev/null
mail_to_program: "| /usr/local/www/data/program_that_takes_the_email"
# postconf -n
shows:
Code:
alias_database = hash:/usr/local/etc/postfix/aliases
alias_maps = hash:/usr/local/etc/postfix/aliases
allow_mail_to_commands = alias
command_directory = /usr/local/sbin
compatibility_level = 3.9
daemon_directory = /usr/local/libexec/postfix
data_directory = /var/db/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
default_privs = mailnull
disable_vrfy_command = yes
html_directory = /usr/local/share/doc/postfix
inet_interfaces = all
inet_protocols = ipv4
local_recipient_maps = unix:passwd.byname $alias_maps
mail_owner = postfix
mail_spool_directory = /var/mail
mailbox_size_limit = 0
mailq_path = /usr/local/bin/mailq
manpage_directory = /usr/local/man
meta_directory = /usr/local/libexec/postfix
mydomain = foobar.net
myhostname = foobar.net
mynetworks = 127.0.0.0/8, 192.168.0.0/16
mynetworks_style = host
myorigin = foobar.net
newaliases_path = /usr/local/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/local/share/doc/postfix
sample_directory = /usr/local/etc/postfix
sendmail_path = /usr/local/sbin/sendmail
setgid_group = maildrop
shlib_directory = /usr/local/lib/postfix
smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination, permit
smtpd_tls_ask_ccert = yes
smtpd_tls_cert_file = /usr/local/etc/apache24/ssl/pemforeverything.pem
smtpd_tls_key_file = $smtpd_tls_cert_file
smtpd_tls_received_header = yes
smtpd_tls_security_level = may
smtpd_tls_session_cache_timeout = 3600s
unknown_local_recipient_reject_code = 550
Problem 2:
While I have these two lines in my main.cf that should say where the alias file is:
Code:
alias_database = hash:/usr/local/etc/postfix/aliases
alias_maps = hash:/usr/local/etc/postfix/aliases
postalias /usr/local/etc/postfix/aliases
The same file, if moved to /etc/aliases gets the above "syntax error" errors.
However the errors in the maillog file when email comes in to
mail_to_program@foobar.net
look like:
Code:
Nov 23 13:51:53 foobar dma[dma][65730]: aliases line 13: syntax error
Nov 23 13:51:53 foobar dma[dma][65730]: could not parse aliases file `/etc/aliases': No error: 0
I don't know why the /etc/aliases is being used instead of the file specified in the alias_maps parameter.
At day 3 working on this, it was time to ask for help.
postconf mail_version
shows mail_version = 3.9
freebsd-version
shows 14.1-STABLE
Last edited by a moderator: