1

Topic: Can not send root emails to locahost, would like to know how to

Hi there,

I have got rid of all the root going to www@mydomain.com just as an example, however it is now triggering the following error:

May  3 09:30:21 server postfix/local[16117]: 564783A6474: to=<root@server.mydomain.co.uk>, relay=local, delay=535, delays=535/0.03/0/0.02, dsn=4.3.0, status=deferred (temporary failure)

What I was wanting it to do, is using locahost not server.mydomain.co.uk. or is there another option to get this working?

This is the contents of my aliases file '/etc/postfix/aliases':

#
#  Aliases in this file will NOT be expanded in the header from
#  Mail, but WILL be visible over networks or from /bin/mail.
#
#    >>>>>>>>>>    The program "newaliases" must be run after
#    >> NOTE >>    this file is updated for any changes to
#    >>>>>>>>>>    show through to sendmail.
#

# Basic system aliases -- these MUST be present.
mailer-daemon:    postmaster
postmaster:    root

# General redirections for pseudo accounts.
bin:        root
daemon:        root
adm:        root
lp:        root
sync:        root
shutdown:    root
halt:        root
mail:        root
news:        root
uucp:        root
operator:    root
games:        root
gopher:        root
ftp:        root
nobody:        root
radiusd:    root
nut:        root
dbus:        root
vcsa:        root
canna:        root
wnn:        root
rpm:        root
nscd:        root
pcap:        root
apache:        root
webalizer:    root
dovecot:    root
fax:        root
quagga:        root
radvd:        root
pvm:        root
amanda:        root
privoxy:    root
ident:        root
named:        root
xfs:        root
gdm:        root
mailnull:    root
postgres:    root
sshd:        root
smmsp:        root
postfix:    root
netdump:    root
ldap:        root
squid:        root
ntp:        root
mysql:        root
desktop:    root
rpcuser:    root
rpc:        root
nfsnobody:    root

ingres:        root
system:        root
toor:        root
manager:    root
dumper:        root
abuse:        root

newsadm:    news
newsadmin:    news
usenet:        news
ftpadm:        ftp
ftpadmin:    ftp
ftp-adm:    ftp
ftp-admin:    ftp
www:        webmaster
webmaster:    root
noc:        root
security:    root
hostmaster:    root
info:        postmaster
marketing:    postmaster
sales:        postmaster
support:    postmaster


# trap decode to catch security attacks
decode:        root

# Person who should get root's mail
#root:        marc
virusalert:    root


Is there anyway of getting roots emails going to the usual mailbox for the root user i.e. '/var/spool/mail'

Hope this is doable, thanks again,
Jez.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Can not send root emails to locahost, would like to know how to

/etc/postfix/aliases looks fine. Did you execute command "postalias /etc/postfix/aliases" after modifying it?

Also, what's your server hostname? And what's the value of postfix setting "myhostname="? Postfix will send to "root@[YOUR_SERVER_HOSTNAME]" by default.

3 (edited by j.smith1981 2011-05-03 18:52:43)

Re: Can not send root emails to locahost, would like to know how to

I did run the command to reload the aliases, or it wouldn't appear to have the deffered message.

Here is the contents at the bottom of the postfix configuration file /etc/postfix/main.cf:

# Enable IPv4, and IPv6 if supported
inet_protocols = ipv4
virtual_alias_domains =
myhostname = server.mydomain.com
myorigin = server.mydomain.com
mydomain = mydomain.co
biff = no
mynetworks = 127.0.0.0/8
mynetworks_style = subnet
smtpd_data_restrictions = reject_unauth_pipelining
smtpd_reject_unlisted_recipient = yes
smtpd_sender_restrictions = permit_mynetworks, reject_sender_login_mismatch, permit_sasl_authenticated
delay_warning_time = 0h
policy_time_limit = 3600
maximal_queue_lifetime = 1d
bounce_queue_lifetime = 1d
recipient_delimiter = +
proxy_read_maps = $canonical_maps $lmtp_generic_maps $local_recipient_maps $mydestination $mynetworks $recipient_bcc_maps $recipient_canonical_maps $relay_domains $relay_recipient_maps $relocated_maps $sender_bcc_maps $sender_canonical_maps $smtp_generic_maps $smtpd_sender_login_maps $transport_maps $virtual_alias_domains $virtual_alias_maps $virtual_mailbox_domains $virtual_mailbox_maps $smtpd_sender_restrictions
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_mynetworks,permit_sasl_authenticated, check_helo_access pcre:/etc/postfix/helo_access.pcre
queue_run_delay = 300s
minimal_backoff_time = 300s
maximal_backoff_time = 4000s
enable_original_recipient = no
disable_vrfy_command = yes
home_mailbox = Maildir/
allow_min_user = no
message_size_limit = 15728640
virtual_minimum_uid = 500
virtual_uid_maps = static:500
virtual_gid_maps = static:500
virtual_mailbox_base = /var/vmail
transport_maps = proxy:mysql:/etc/postfix/mysql/transport_maps_user.cf, proxy:mysql:/etc/postfix/mysql/transport_maps_domain.cf
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql/virtual_mailbox_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql/virtual_mailbox_maps.cf
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql/virtual_alias_maps.cf, proxy:mysql:/etc/postfix/mysql/domain_alias_maps.cf, proxy:mysql:/etc/postfix/mysql/catchall_maps.cf, proxy:mysql:/etc/postfix/mysql/domain_alias_catchall_maps.cf
sender_bcc_maps = proxy:mysql:/etc/postfix/mysql/sender_bcc_maps_domain.cf, proxy:mysql:/etc/postfix/mysql/sender_bcc_maps_user.cf
recipient_bcc_maps = proxy:mysql:/etc/postfix/mysql/recipient_bcc_maps_domain.cf, proxy:mysql:/etc/postfix/mysql/recipient_bcc_maps_user.cf
relay_domains = $mydestination, proxy:mysql:/etc/postfix/mysql/relay_domains.cf
smtpd_sender_login_maps = proxy:mysql:/etc/postfix/mysql/sender_login_maps.cf
smtpd_reject_unlisted_sender = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
broken_sasl_auth_clients = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_authenticated_header = no
smtpd_recipient_restrictions = reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unlisted_recipient, check_policy_service inet:127.0.0.1:7777, permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, reject_non_fqdn_helo_hostname, reject_invalid_helo_hostname, check_policy_service inet:127.0.0.1:10031
smtpd_tls_security_level = may
smtpd_enforce_tls = no
smtpd_tls_loglevel = 0
smtpd_tls_key_file = /etc/pki/tls/private/iRedMail.key
smtpd_tls_cert_file = /etc/pki/tls/certs/iRedMail_CA.pem
smtpd_tls_CAfile = /etc/pki/tls/certs/iRedMail_CA.pem
tls_random_source = dev:/dev/urandom
tls_daemon_random_source = dev:/dev/urandom
#
# Uncomment the following line to enable policyd sender throttle.
#
#smtpd_end_of_data_restrictions = check_policy_service inet:127.0.0.1:10032
mailbox_command = /usr/libexec/dovecot/deliver
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1
smtpd_sasl_type = dovecot
smtpd_sasl_path = ./dovecot-auth
content_filter = smtp-amavis:[127.0.0.1]:10024

4

Re: Can not send root emails to locahost, would like to know how to

Does anyone have any ideas as to how to get around this problem?

I have even tried adding server.mydomain.com to my DNS records but nothing works, any helps appreciated.

5

Re: Can not send root emails to locahost, would like to know how to

j.smith1981 wrote:

May  3 09:30:21 server postfix/local[16117]: 564783A6474: to=<root@server.mydomain.co.uk>, relay=local, delay=535, delays=535/0.03/0/0.02, dsn=4.3.0, status=deferred (temporary failure)

What's the log message before and after this line?