|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Postfix, MySQL based virtual domains and Mailman
From: Peter Kiem (zordah
zordah.net)
Date: Wed Jun 02 2004 - 03:05:27 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I'm running Postfix 2.1.1-3 with completely virtual domains (no local user
accounts) with the domain info coming from MySQL database. Also hands out
to Amavisd-new for spam and virus checking.
I've tried to integrate Mailman into the setup and I just cannot get it to
recognise the mailman aliases.
Here's a short summary of what I have tried to do:
1. Ensured localhost is in $mydestination
2. Added the mailman aliases file to $alias_database and $alias_maps
3. Built the alias db with newaliases
4. Put in a virtual alias of mailman
zordah.net -> mailman
localhost
When I send email to mailman
zordah.net I get 450 4.1.0
<mailman
localhost.zordah.net>: Recipient address rejected: User unknown
in local recipient table (in reply to end of DATA command)
That should work, right?
postconf -n
===========
alias_database = hash:/etc/postfix/aliases, hash:/home/mailman/aliases
alias_maps = hash:/etc/postfix/aliases, hash:/home/mailman/aliases
body_checks = regexp:/etc/postfix/body_checks
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
header_checks = regexp:/etc/postfix/header_checks
html_directory = /usr/share/doc/postfix-2.1.1-documentation/html
inet_interfaces = 127.0.0.1, 202.173.151.130
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
message_size_limit = 5120000
mydestination = $myhostname, localhost.$mydomain, localhost
myhostname = caramon.zordah.net
mynetworks = 127.0.0.0/8, 192.168.0.0/16, 202.173.151.128/28
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
notify_classes = bounce, 2bounce, delay, policy, protocol, resource, software
owner_request_special = no
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.1.1-documentation/readme
relay_domains = lists.zordah.net
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_hard_error_limit = 10
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_mynetworks, check_client_access
hash:/etc/postfix/helo_ip_whitelist, check_helo_access
regexp:/etc/postfix
/helo_regexp, reject_invalid_hostname
smtpd_junk_command_limit = 3
smtpd_recipient_restrictions = reject_non_fqdn_sender,
reject_non_fqdn_recipient, permit_mynetworks, reject_unauth_destination,
check_rec
ipient_access hash:/etc/postfix/per_user_rules, check_client_access
hash:/etc/postfix/client_checks, check_client_access hash:/etc/postfix/
zordah_client, check_client_access
regexp:/etc/postfix/zordah_client_regexp, check_sender_access
hash:/etc/postfix/spamtrap.senders, check
_sender_access hash:/etc/postfix/sender_checks, check_sender_access
regexp:/etc/postfix/sender_checks_regexp, check_recipient_access hash:/
etc/postfix/recipient_checks, check_recipient_access
regexp:/etc/postfix/recipient_checks_regexp, check_sender_access
hash:/etc/postfix/zor
dah, reject_unknown_sender_domain, reject_unknown_recipient_domain,
reject_unauth_pipelining, reject_rbl_client dnsbl.njabl.org, reject_
rbl_client http.dnsbl.sorbs.net, reject_rbl_client socks.dnsbl.sorbs.net,
reject_rbl_client misc.dnsbl.sorbs.net, reject_rbl_client smtp.d
nsbl.sorbs.net, reject_rbl_client web.dnsbl.sorbs.net, reject_rbl_client
list.dsbl.org, reject_rbl_client opm.blitzed.org, check_sender_a
ccess hash:/etc/postfix/strict_sender_map, permit
smtpd_restriction_classes = strict_client_domain,
tafi_greenfroglover_com_rules
smtpd_soft_error_limit = 5
soft_bounce = yes
strict_rfc821_envelopes = yes
syslog_facility = local1
transport_maps = hash:/etc/postfix/transport
unknown_address_reject_code = 554
unknown_client_reject_code = 554
unknown_hostname_reject_code = 554
unknown_local_recipient_reject_code = 550
virtual_alias_maps = mysql:/etc/postfix/virtual_alias.cf
virtual_gid_maps = mysql:/etc/postfix/virtual_gid.cf
virtual_mailbox_base = /home/mail
virtual_mailbox_domains = mysql:/etc/postfix/virtual_domain.cf
virtual_mailbox_maps = mysql:/etc/postfix/virtual_mailbox.cf
virtual_minimum_uid = 500
virtual_uid_maps = mysql:/etc/postfix/virtual_uid.cf
/home/mailman/aliases
=====================
mailman: "|/home/mailman/mail/mailman post mailman"
/etc/postfix/virtual_alias.cf
=============================
user=xxxx
password=yyyy
dbname=zzzz
table=alias
select_field=username
where_field=alias
hosts=localhost
Alias Table
===========
select * from alias where alias like '%zordah.net';
+-------------------------+--------------------------+
| alias | username |
+-------------------------+--------------------------+
| abuse
zordah.net | postmaster
zordah.net |
| postmaster
zordah.net | zordah
zordah.net |
| pkiem
zordah.net | zordah
zordah.net |
| mailman
zordah.net | mailman
localhost |
+-------------------------+--------------------------+
Anything I have forgotten?
--
Regards,
+-----------------------------+---------------------------------+
| Peter Kiem .^. | E-Mail : <zordah
zordah.net> |
| Zordah IT /V\ | Mobile : +61 0414 724 766 |
| IT Consultancy & /( )\ | WWW : www.zordah.net |
| Internet Services ^^-^^ | ICQ : "Zordah" 866661 |
+-----------------------------+---------------------------------+
My current spamtrap address is est0604
zordah.net
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]