|
I've set up postfix + courier-imap + mysql which is working fine and I now want to incorporate maildrop to do quotas and autoreplies. This is
where my problems start.
1.My maildrop setup is
#./configure --enable-maildirquota --enable-maildropmysql --enable-maildrop-uid=postfix --enable-maildrop-gid=postfix
#make
#make install-strip
#make install-man
because my postfix is run as the user postfix:postfix
2.my postconf -n is:
-----------------------------------------------------------------------------
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
home_mailbox = Maildir/
inet_interfaces = all
local_destination_concurrency_limit = 2
local_recipient_maps = $virtual_mailbox_maps
mail_owner = postfix
mail_spool_directory = /xxxx/data
mailbox_command = /usr/local/bin/maildrop
mailbox_size_limit = 204800000
mailbox_transport = maildrop
mailq_path = /usr/bin/mailq
manpage_directory = /usr/local/man
message_size_limit = 104800000
mydestination = $mydomain,$myhostname,$transport_maps
mydomain = xxxx.com.cn
myhostname = xxx.xxxx.com.cn
mynetworks = 127.0.0.0/8
mynetworks_style = host
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = no
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtpd_client_restrictions = permit_sasl_authenticated
smtpd_delay_reject = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_auth_destination,reject
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $mydomain
smtpd_sasl_security_options = noanonymous
transport_maps = mysql:/etc/postfix/my-transport.cf
unknown_local_recipient_reject_code = 450
virtual_gid_maps = static:12345
virtual_mailbox_base = /xxxx/data
virtual_mailbox_limit = 204800000
virtual_mailbox_maps = mysql:/etc/postfix/my-aliases.cf
virtual_uid_maps = static:12345
---------------------------------------------------------------------
3. /etc/postfix/master.cf i have:
maildrop unix - n n - - pipe flags=Ru user=postfix:postfix argv=/usr/local/bin/maildrop -d ${recipient}
where postfix:postfix are the uid:gid of the user's Maildir.
4.in my mysql transport table i have the following domain settings:
test.domain.com virtual:
6.i have a user like "tester",and create a ".../tester/Maildir/.mailfilter"
in the file have the line:
-------------------------------------------------------------
foreach(/^From:.*/)
{
foreach(getaddr($MATCH))=~/.+/
{
if("tester@xxxx.com.cn"=~/^.* +$MATCH/)
{
echo "8888888888888888!"
EXITCODE=1
exit
}
}
}
------------------------------------------------------------------
However when I try to send mail to or from : "tester@xxxx.com.cn".
Have nothing happen???? the mail can receive from tester@xxxx.com.cn and send out?
7.but i run:
#cat "aa"|/usr/local/bin/maildrop -d tester@xxxx.com.cn
the mail can be recived.
Please advice me on what I could be doing wrong.
thank you |
|