Re: virtual user rejected

2012-03-22 Thread /dev/rob0
On Thu, Mar 22, 2012 at 05:51:16PM -0400, Tim Dunphy wrote:
> after adding a new virtual user called request to the virtual conf
> file user is rejected:
> 
> [sysmail01:/data/home/dunphy] root% telnet localhost 25
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^]'.
> 220 mail01.mlbam.com ESMTP Postfix
> HELO mail
> 250 mail01.mlbam.com
> MAIL FROM: 
> 250 2.1.0 Ok
> RCPT TO: 
> 550 5.1.1 : Recipient address rejected: User
> unknown in virtual alias table
> 
> virtual_maps in main.conf
> 
> [sysmail01:/data/home/dunphy] root% grep virtual /etc/postfix/main.cf
> virtual_maps = dbm:/etc/postfix/virtual

virtual_maps has been deprecated since Postfix 2.0. It still works 
because it is the default value for the replacement setting, 
virtual_alias_maps.

>  from postfix virtual conf
> 
> [sysmail01:/data/home/dunphy] root% grep request /etc/postfix/virtual
> #owner_request_special
> #   Give special treatment to owner-xxx and xxx-request
> requ...@example.com   request

You are using an unqualified target in virtual_alias_maps, and 
apparently the example.com domain is in virtual_alias_domains (by 
means of a domain entry in /etc/postfix/virtual, most likely.)

This means that requ...@example.com is rewritten to 
"request@$myorigin". You have not set myorigin (you might consider 
doing that), so you get the default of "myorigin = $myhostname". You 
did set "myhostname = mail01.example.com".

Where/how should mail01.example.com mail be delivered? If that is 
also in virtual_alias_domains, you must have a listing for 
requ...@mail01.example.com which resolves to an address NOT in
virtual_alias_domains.

See these links for more:

http://www.postfix.org/BASIC_CONFIGURATION_README.html
http://www.postfix.org/postconf.5.html#append_at_myorigin
http://www.postfix.org/postconf.5.html#virtual_alias_domains
http://www.postfix.org/postconf.5.html#virtual_alias_maps
http://www.postfix.org/postconf.5.html#virtual_maps

> postfix conf -n
> 
> [sysmail01:/data/home/dunphy] root% postconf -n
> anvil_rate_time_unit = 60s
> command_directory = /usr/sbin
> config_directory = /etc/postfix
> daemon_directory = /usr/libexec/postfix
> data_directory = /var/lib/postfix
> debug_peer_level = 2
> home_mailbox = Maildir/
> html_directory = no
> inet_interfaces = all
> mail_owner = postfix
> mailbox_command = /opt/csw/bin/procmail
> mailq_path = /usr/bin/mailq
> manpage_directory = /usr/man
> milter_default_action = accept
> mydomain = example.com
> myhostname = mail01.example.com
> mynetworks = 192.168.0.0/16, 172.16.0.0/12, 10.0.0.0/8, 127.0.0.0/8,
> 66.227.109.123, 8.12.35.199, 66.192.34.62, 208.39.164.225,
> 208.39.164.226, 208.39.164.227, 208.39.164.228, 209.102.201.253
> newaliases_path = /usr/bin/newaliases
> proxy_interfaces = 63.240.22.35
> queue_directory = /var/spool/postfix
> readme_directory = no
> sample_directory = /etc/postfix
> sendmail_path = /usr/lib/sendmail
> setgid_group = postdrop
> smtpd_client_connection_count_limit = 50
> smtpd_client_connection_rate_limit = 100
> smtpd_client_event_limit_exceptions =
> ${smtpd_client_connection_limit_exceptions:$mynetworks}
> smtpd_client_message_rate_limit = 100
> smtpd_client_recipient_rate_limit = 0
> smtpd_client_restrictions = permit_mynetworks, reject_rbl_client
> sbl-xbl.spamhaus.org

This is old too. Sbl-xbl.spamhaus.org has been superceded some years 
ago by Zen.spamhaus.org.

http://www.spamhaus.org/zen/

> smtpd_milters = unix:/var/run/clamav/clamav-milter
> unknown_local_recipient_reject_code = 550
> 
> the Maildir has been created in the home directory
> 
> [sysmail01:/data/home/dunphy] root% ls -l /export/home/request/Maildir/
> total 21
> drwxr-xr-x   2 root root   7 Mar 21 16:58 cur
> -rw-r--r--   1 root root   17408 Mar 21 16:58 dovecot.index.cache
> -rw-r--r--   1 root root1004 Mar 21 16:58 dovecot.index.log
> -rw-r--r--   1 root root 376 Mar 21 16:58 dovecot-uidlist
> -rw---   1 root root   8 Mar 21 16:58 dovecot-uidvalidity
> -rw---   1 root root   0 Mar 21 16:58
> dovecot-uidvalidity.4f638025
> drwxr-xr-x   2 root root   5 Mar 21 16:58 new
> -rw---   1 root root1239 Mar 21 16:58 proclog
> drwxr-xr-x   2 root root   2 Mar 21 16:58 tmp
> 
> 
> This is a solaris host.
> 
> [sysmail01:/data/home/dunphy] root% uname -a
> SunOS sysmail01 5.10 Generic_141415-07 i86pc i386 i86pc
-- 
  http://rob0.nodns4.us/ -- system administration and consulting
  Offlist GMX mail is seen only if "/dev/rob0" is in the Subject:


Re: virtual user rejected

2012-03-22 Thread Ansgar Wiechers
On 2012-03-22 Tim Dunphy wrote:
> after adding a new virtual user called request to the virtual conf
> file user is rejected:
[...]
> [sysmail01:/data/home/dunphy] root% grep virtual /etc/postfix/main.cf
> virtual_maps = dbm:/etc/postfix/virtual

Apparently you have $virtual_maps in main.cf ...

> [sysmail01:/data/home/dunphy] root% postconf -n
> anvil_rate_time_unit = 60s
[...]
> smtpd_milters = unix:/var/run/clamav/clamav-milter
> unknown_local_recipient_reject_code = 550

... but not in your active configuration. Is your Postfix chrooted
(causing it to use a different main.cf)?

Regards
Ansgar Wiechers
-- 
"Abstractions save us time working, but they don't save us time learning."
--Joel Spolsky