OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
RE: "554 Recipient address rejected: Relay access denied" problems

From: Postfix Support Mail (postfixsmtriad.ath.cx)
Date: Sat May 12 2007 - 02:22:00 CDT


## >> Mac, you should read
## >> http://www.postfix.org/DEBUG_README.html to know how to
## >> debug when you have problems, and how to report problems
## >> to this list.
## >> Without information about your configuration, people is
## >> not able to help you.
## >>
## >> Pablo

i've read that document. i've done as many of the things on there as i can.
i've got postfinger, saslfinger, and i have run them. i'm not sure what i'm
supposed to be looking for. i'm very frustrated, and looking at that
document isn't really helping me, maybe i just don't understand what i'm
looking at.

i used /usr/sbin/sendmail -bv address, and received this error:
May 12 03:53:10 lanlp01 postfix/pickup[30007]: E94A58D411A: uid=0
from=<root>
May 12 03:53:10 lanlp01 postfix/cleanup[30345]: E94A58D411A:
message-id=<20070512075310.E94A58D411Alocaldomain.com>
May 12 03:53:10 lanlp01 postfix/qmgr[30012]: E94A58D411A:
from=<rootlocaldomain.com>, size=334, nrcpt=1 (queue active)
May 12 03:53:12 lanlp01 postfix/smtp[30349]: E94A58D411A:
to=<remoteuserremotedomain.com>, relay=host.remotedomain.com[X.X.X.X],
delay=2, status=deliverable (delivery via host.remotedomain.com[X.X.X.X]:
250 remoteuserremotedomain.com )
May 12 03:53:12 lanlp01 postfix/cleanup[30345]: 6360F8D411B:
message-id=<20070512075312.6360F8D411Blocaldomain.com>
May 12 03:53:12 lanlp01 postfix/qmgr[30012]: E94A58D411A: removed
May 12 03:53:12 lanlp01 postfix/qmgr[30012]: 6360F8D411B: from=<>,
size=2006, nrcpt=1 (queue active)
May 12 03:53:12 lanlp01 postfix/trivial-rewrite[30346]: warning: do not list
domain localdomain.com in BOTH virtual_alias_domains and
virtual_mailbox_domains
May 12 03:53:12 lanlp01 postfix/error[30352]: 6360F8D411B:
to=<rootlocaldomain.com>, relay=none, delay=0, status=bounced (User unknown
in virtual alias table)
May 12 03:53:12 lanlp01 postfix/qmgr[30012]: 6360F8D411B: removed

i also ran /usr/sbin/sendmail -v address, but that one just sits there,
doing nothing, i have to interrup the process to get my shell back. nothing
appears in the mail logs either. what's it supposed to do?

honestly, i really don't know what's wrong. it seems like no matter what i
do, no matter what i change, i get:

May 12 03:36:41 mailserver postfix/smtpd[30027]: NOQUEUE: reject: RCPT from
internet-host[X.X.X.X]: 554 <remoteuserremotedomain.com>: Relay access
denied; from=<localuserlocaldomain.com> to=<remoteuserremotedomain.com>
proto=ESMTP helo=<mysendinghost>

when i turn on verbose reporting, i also see "(User unknown in virtual alias
table)".

additionally, when i uncomment "#smtpd_sasl_auth_enable = yes", then the
error "fatal: SASL per-process initialization failed" appears.

i've tried everything i can think of. something is very broken, but i can't
figure out what. here is my config as per postfinger and saslfinger, i
apologize for how long it is and that they seem to repeat some information
in both:

postfinger
--System Parameters--
mail_version = 2.2.9
hostname = lanlp01
uname = Linux lanlp01 2.6.16.27-0.9-smp #1 SMP Tue Feb 13 09:35:18 UTC 2007
i686 i686 i386 GNU/Linux

--Packaging information--
looks like this postfix comes from RPM package: postfix-2.2.9-10

--main.cf non-default parameters--
alias_maps = hash:/etc/aliases
biff = no
broken_sasl_auth_clients = yes
canonical_maps = hash:/etc/postfix/canonical
content_filter = amavis:[127.0.0.1]:10024
daemon_directory = /usr/lib/postfix
html_directory = /usr/share/doc/packages/postfix/html
inet_protocols = all
mailbox_size_limit = 0
mail_spool_directory = /var/spool/mail/
manpage_directory = /usr/share/man
mydestination =
myhostname = lanlp01.courtlandconsulting.com
mynetworks = 192.168.100.0/24, 127.0.0.0/8
readme_directory = /usr/share/doc/packages/postfix/README_FILES
relocated_maps = hash:/etc/postfix/relocated
sample_directory = /usr/share/doc/packages/postfix/samples
sender_canonical_maps = hash:/etc/postfix/sender_canonical
setgid_group = maildrop
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated,
reject_unauth_destination, permit
smtpd_tls_CAfile = /etc/ssl/cacert.pem
smtpd_tls_cert_file = /etc/ssl/lanlp01.cert
smtpd_tls_key_file = /etc/ssl/lanlp01.key
smtpd_tls_loglevel = 2
smtpd_tls_received_header = yes
smtpd_use_tls = yes
transport_maps = hash:/etc/postfix/transport
virtual_alias_domains =
proxy:mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_gid_maps = static:5000
virtual_mailbox_base = /var/spool/mail/virtual
virtual_mailbox_domains =
proxy:mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_limit = 102400000
virtual_mailbox_maps =
proxy:mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_minimum_uid = 5000
virtual_uid_maps = static:5000

--master.cf--
smtp inet n - n - - smtpd
pickup fifo n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
tlsmgr unix - - n 1000? 1 tlsmgr
rewrite unix - - n - - trivial-rewrite
bounce unix - - n - 0 bounce
defer unix - - n - 0 bounce
trace unix - - n - 0 bounce
verify unix - - n - 1 verify
flush unix n - n 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - n - - smtp
relay unix - - n - - smtp
        -o fallback_relay=
showq unix n - n - - showq
error unix - - n - - error
discard unix - - n - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
scache unix - - n - 1 scache
maildrop unix - n n - - pipe
  flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
cyrus unix - n n - - pipe
  user=cyrus argv=/usr/lib/cyrus/bin/deliver -e -r ${sender} -m ${extension}
${user}
uucp unix - n n - - pipe
  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail
($recipient)
ifmail unix - n n - - pipe
  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
  flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop
$recipient
procmail unix - n n - - pipe
  flags=R user=nobody argv=/usr/bin/procmail -t -m /etc/procmailrc ${sender}
${recipient}
amavis unix - - n - 2 smtp
     -o smtp_data_done_timeout=1200
     -o disable_dns_lookups=yes
127.0.0.1:10025 inet n - n - - smtpd
     -o content_filter=
     -o local_recipient_maps=
     -o relay_recipient_maps=
     -o smtpd_restriction_classes=
     -o smtpd_client_restrictions=
     -o smtpd_helo_restrictions=
     -o smtpd_sender_restrictions=
     -o
smtpd_recipient_restrictions=permit_mynetworks,permit_sasl_authenticated,per
mit
     -o mynetworks=127.0.0.0/8
     -o strict_rfc821_envelopes=yes
     -o smtpd_error_sleep_time=0
     -o smtpd_soft_error_limit=1001
     -o smtpd_hard_error_limit=1000

-- end of postfinger output --

saslfinger:
saslfinger - postfix Cyrus sasl configuration Sat May 12 03:49:58 EDT 2007
version: 1.0.1
mode: server-side SMTP AUTH

-- basics --
Postfix: 2.2.9
System:
Welcome to SUSE Linux Enterprise Server 10 (i586) - Kernel \r (\l).

-- smtpd is linked to --
        libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0xb7ee3000)

-- active SMTP AUTH and TLS parameters for smtpd --
broken_sasl_auth_clients = yes
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
smtpd_tls_CAfile = /etc/ssl/cacert.pem
smtpd_tls_cert_file = /etc/ssl/lanlp01.cert
smtpd_tls_key_file = /etc/ssl/lanlp01.key
smtpd_tls_loglevel = 2
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes

-- listing of /usr/lib/sasl2 --
total 724
drwxr-xr-x 2 root root 4096 2007-05-11 19:43 .
drwxr-xr-x 89 root root 32768 2007-05-10 14:11 ..
-rwxr-xr-x 1 root root 13216 2006-06-16 10:40 libanonymous.so
-rwxr-xr-x 1 root root 13216 2006-06-16 10:40 libanonymous.so.2
-rwxr-xr-x 1 root root 13216 2006-06-16 10:40 libanonymous.so.2.0.21
-rwxr-xr-x 1 root root 15548 2006-06-16 10:40 libcrammd5.so
-rwxr-xr-x 1 root root 15548 2006-06-16 10:40 libcrammd5.so.2
-rwxr-xr-x 1 root root 15548 2006-06-16 10:40 libcrammd5.so.2.0.21
-rwxr-xr-x 1 root root 43316 2006-06-16 10:40 libdigestmd5.so
-rwxr-xr-x 1 root root 43316 2006-06-16 10:40 libdigestmd5.so.2
-rwxr-xr-x 1 root root 43316 2006-06-16 10:40 libdigestmd5.so.2.0.21
-rwxr-xr-x 1 root root 25168 2006-06-16 10:40 libgssapiv2.so
-rwxr-xr-x 1 root root 25168 2006-06-16 10:40 libgssapiv2.so.2
-rwxr-xr-x 1 root root 25168 2006-06-16 10:40 libgssapiv2.so.2.0.21
-rwxr-xr-x 1 root root 13724 2006-06-16 10:41 liblogin.so
-rwxr-xr-x 1 root root 13724 2006-06-16 10:41 liblogin.so.2
-rwxr-xr-x 1 root root 13724 2006-06-16 10:41 liblogin.so.2.0.21
-rwxr-xr-x 1 root root 44044 2006-06-16 10:40 libotp.so
-rwxr-xr-x 1 root root 44044 2006-06-16 10:40 libotp.so.2
-rwxr-xr-x 1 root root 44044 2006-06-16 10:40 libotp.so.2.0.21
-rwxr-xr-x 1 root root 14268 2006-06-16 10:40 libplain.so
-rwxr-xr-x 1 root root 14268 2006-06-16 10:40 libplain.so.2
-rwxr-xr-x 1 root root 14268 2006-06-16 10:40 libplain.so.2.0.21
-rwxr-xr-x 1 root root 18316 2006-06-16 10:40 libsasldb.so
-rwxr-xr-x 1 root root 18316 2006-06-16 10:40 libsasldb.so.2
-rwxr-xr-x 1 root root 18316 2006-06-16 10:40 libsasldb.so.2.0.21
-rwxr-xr-x 1 root root 21740 2006-06-16 10:41 libsql.so
-rwxr-xr-x 1 root root 21740 2006-06-16 10:41 libsql.so.2
-rwxr-xr-x 1 root root 21740 2006-06-16 10:41 libsql.so.2.0.21
-rw------- 1 root root 344 2007-05-11 19:43 smtpd.conf
-rw------- 1 root root 344 2007-05-11 19:23 smtpd.conf~
-rw------- 1 root root 49 2007-05-11 16:35 smtpd.conf.ispconf
-rw------- 1 root root 343 2007-05-10 13:48 smtpd.conf.rpmsave

-- content of /usr/lib/sasl2/smtpd.conf --
#pwcheck_method: saslauthd
pwcheck_method: auxprop
#pwcheck_method:authdaemond
auxprop_plugin = sql
mech_list: plain login
#allow_plaintext = true
sql_verbose: yes
sql_engine: mysql
sql_hostnames: 127.0.0.1
sql_user: --- replaced ---
sql_passwd: --- replaced ---
sql_database: postfix
sql_select: SELECT password FROM mailbox WHERE username = '%u%r'

-- active services in /etc/postfix/master.cf --
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
smtp inet n - n - - smtpd
pickup fifo n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
tlsmgr unix - - n 1000? 1 tlsmgr
rewrite unix - - n - - trivial-rewrite
bounce unix - - n - 0 bounce
defer unix - - n - 0 bounce
trace unix - - n - 0 bounce
verify unix - - n - 1 verify
flush unix n - n 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - n - - smtp
relay unix - - n - - smtp
        -o fallback_relay=
showq unix n - n - - showq
error unix - - n - - error
discard unix - - n - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
scache unix - - n - 1 scache
maildrop unix - n n - - pipe
  flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
cyrus unix - n n - - pipe
  user=cyrus argv=/usr/lib/cyrus/bin/deliver -e -r ${sender} -m ${extension}
${user}
uucp unix - n n - - pipe
  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail
($recipient)
ifmail unix - n n - - pipe
  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
  flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop
$recipient
procmail unix - n n - - pipe
  flags=R user=nobody argv=/usr/bin/procmail -t -m /etc/procmailrc ${sender}
${recipient}

amavis unix - - n - 2 smtp
     -o smtp_data_done_timeout=1200
     -o disable_dns_lookups=yes

127.0.0.1:10025 inet n - n - - smtpd
     -o content_filter=
     -o local_recipient_maps=
     -o relay_recipient_maps=
     -o smtpd_restriction_classes=
     -o smtpd_client_restrictions=
     -o smtpd_helo_restrictions=
     -o smtpd_sender_restrictions=
     -o
smtpd_recipient_restrictions=permit_mynetworks,permit_sasl_authenticated,per
mit
     -o mynetworks=127.0.0.0/8
     -o strict_rfc821_envelopes=yes
     -o smtpd_error_sleep_time=0
     -o smtpd_soft_error_limit=1001
     -o smtpd_hard_error_limit=1000

-- mechanisms on localhost --

-- end of saslfinger output --

No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.467 / Virus Database: 269.6.8/797 - Release Date: 2007-05-10
17:10