On 06/01/2015 01:27 PM, Wietse Venema wrote:
Sharon Stahl:
Hi Wietse,
I came back to work and did a lot of testing but adding $mydomain to
the mydestination definition made no difference with the .forward file
only having
a username causing a mail loop. Error in maillog appears to indicate
You had a complaint that delivery for a local name in .forward was
not subject to expansion via the aliases file. If you claim that
adding the myorigin value ($mydomain) to mydestination makes no
difference, then I need to see:
- Logfile evidence.
- Output from "postconf -n", instead of main.cf snippets.
You can anonymize the name per instructions in
http://www.postfix.org/DEBUG_README.html
Wietse
Sorry.
I'm running postfix-2.6.6 on CentOS7.
"thismachine" (postfix machine) is listed in the local-hosts-names
sendmail type file.
"thismachine" is NOT listed in the transport file
My problem is that when the .forward file only has just "username",
"thismachine" does not check the aliases file to see that it is the
machine that
keeps mail for that user. It adds @domain to the name and sends it off to
our main NIS machine that answers for "domain" (masterfor) and is
currrently a Solaris machine
running sendmail. That machine sends it back because it knows that it
is for
"thismachine" and "thismachine" marks it as "mail loop".
Here are entries from log files. Mail was sent to bluzm@thismachine
Jun 1 11:00:21 thismachine sendmail[31377]: t51L0LUM031377:
to=bluzm@thismachine, ctladdr=root (0/0), delay=00:00:00,
xdelay=00:00:00, mailer=relay, pri=30291, relay=[127.0.0.1] [127.0.0.1],
dsn=2.0.0, stat=Sent (Ok: queued as 7668220035F)
Jun 1 11:00:21 thismachine postfix/local[31382]: 7668220035F:
to=<bl...@thismachine.domain.com>, relay=local, delay=0.08,
delays=0.06/0.01/0/0, dsn=2.0.0, status=sent (forwarded as 8374A20020A)
****I think it should be kept at this point because "thismachine"
accepts mail for user "bluzm"****
**** but it gets forwarded to the machine that answers for
domain.com address ****
Jun 1 11:00:21 thismachine postfix/smtp[31351]: 8374A20020A:
to=<bl...@domain.com>, orig_to=<bl...@thismachine.domain.com>,
relay=master...@domain.com:25, delay=0.06, delays=0/0/0.04/0.01,
dsn=2.0.0, status=sent (250 2.0.0 t51L0LoK019120 Message accepted for
delivery)
Jun 1 11:00:21 masterfor sendmail[19121]: [ID 801593 mail.info]
t51L0LoK019120: to=bl...@thismachine.domain.com, delay=00:00:00,
xdelay=00:00:00, mailer=smtp, pri=31097, relay=thismachine.domain.com,
dsn=2.0.0, stat=Sent (Ok: queued as 9AB3820020A)
****"masterfor knows that it should not have gotten the message because
"thismachine" is ****
**** supposed to take the mail for bluzm so it sends it back. ****
Jun 1 11:00:21 thismachine postfix/local[31382]: 9AB3820020A:
to=<bl...@thismachine.domain.com>, relay=local, delay=0.08,
delays=0.05/0/0/0.03, dsn=5.4.6, status=bounced (mail forwarding loop
for bl...@thismachine.domain.com)
>>Here is output from postconf -n
# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases, nis:mail.aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
delay_warning_time = 4
html_directory = no
inet_interfaces = all
inet_protocols = all
mail_owner = postfix
mail_spool_directory = /var/spool/mail
mailbox_size_limit = 0
mailq_path = /usr/bin/mailq.postfix
masquerade_domains = $mydomain
masquerade_exceptions = root
message_size_limit = 26214400
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain,
/etc/postfix/local-host-names
mydomain = domain.com
myhostname =thismachine.domain.com
mynetworks = [our subnets]
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
recipient_delimiter = +
relay_domains = $mydestination, $mydomain
relayhost = [only mail input/output of domain server]
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_recipient_restrictions = permit_mynetworks,
permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $mydomain
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_tls_security_options = $smtpd_sasl_security_options
smtpd_sasl_type = dovecot
transport_maps = hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 550
Hope you can see the problem. It certainly has NOT made sense to me yet.
Aloha, Sharon