View Full Version : Postfix check_recipient_access?
Rocky
7th June 2006, 18:53
Scenario:
Spam Filter Debian Sarge 3.1/Postfix2.1.5/Mailscanner(Mail Relay Gateway) ----> Exchange 2000 Server
My Exchange 2000 server does not have the ability to know whether to reject or accept mails for users that no longer exists, therefore creating a ton of undeliverable messages in its queue.
I came accross the Postfix check_recipient_access feature, which uses a file to store user email information that Postfix can use to decide whether to accept of reject emails. However, I don't know how to set this up. I need the spam filter to have to ability to reject mails for certain users that no longer exists.
My main goal is to cut down on the amount of undeliverable mails in my Exchange 2000 queue.
Also, is there a way to create a local user account on the spam filter that can be a catchall mailbox? I also would need pop3 access into this mail box to read emails if my Exchange box goes down. I need to create a failsafe if the Exchange box should puke, which I think it will....
Any help would be greatly appreciated. Thanks.
UPDATE:
I've successfully set up a Postfix access file that stores email addresses to reject. Therefore, I only need help to create the catchall email account.
Thanks.
falko
7th June 2006, 21:41
Does your Postfix use system users or virtual users?
Rocky
7th June 2006, 23:59
It's just a mail filter that relays all the mails to my Exchange box. In the Postfix configuration, there's an option that allows you to define a user to get a bcc of all the mails. I chose the local user mail. I used webmin and logged into the mailbox for user mail and noticed that it was working. I was able to get the system to send a bcc of all emails to a mail-enable user named mail on spam filter.
How would I be able to access this account using pop3 or any other method? I don't want end users to log into this account using webmin.
Is this a maildir or mbox account?
Rocky
8th June 2006, 15:22
How would I be able to tell if its a maildir or mbox account?
falko
8th June 2006, 15:59
What's the output of postconf -n |grep home_mailbox and postconf -d |grep home_mailbox?
Rocky
8th June 2006, 16:20
postconf -n |grep mail:
always_bcc = mail
mailbox_size_limit = 0
myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name Piratefish
postconf -d |grep mail:
alias_maps = hash:/etc/aliases, nis:mail.aliases
allow_mail_to_commands = alias, forward
allow_mail_to_files = alias, forward
home_mailbox =
lmtp_mail_timeout = 300s
mail_name = Postfix
mail_owner = postfix
mail_release_date = 20040915
mail_spool_directory = /var/mail
mail_version = 2.1.5
mailbox_command =
mailbox_command_maps =
mailbox_delivery_lock = fcntl, dotlock
mailbox_size_limit = 51200000
mailbox_transport =
mailq_path = /usr/bin/mailq
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks
sendmail_path = /usr/sbin/sendmail
smtp_mail_timeout = 300s
smtpd_banner = $myhostname ESMTP $mail_name
sun_mailtool_compatibility = no
syslog_facility = mail
unknown_virtual_mailbox_reject_code = 550
virtual_mailbox_base =
virtual_mailbox_domains = $virtual_mailbox_maps
virtual_mailbox_limit = 51200000
virtual_mailbox_lock = fcntl
virtual_mailbox_maps =
I was thinking that maybe I should create an additional mail user using the mbox format, instead of using an existing one. This way, I won't interfere with the system users and I can use the newly created user as the catchall account also. But I don't know how to do this. Also, I would need IMAP access to the new mailbox. Any suggestions?
falko
8th June 2006, 16:51
You posted the wrong output. I asked for
postconf -n |grep home_mailbox
and
postconf -d |grep home_mailbox
Rocky
8th June 2006, 16:57
postconf -n |grep home_mailbox:
postconf -d |grep home_mailbox
home_mailbox =
The first string didn't return anything.
Update:
I've learnt how to create mail users through the webmin panel on the bebian sarge system. So now i only need to get the mailbox in mbox format and also to install an IMAP package.
falko
9th June 2006, 13:54
You're already using mbox.
and also to install an IMAP package.
Run
apt-get install ipopd-ssl uw-imapd-sslThen create the file /etc/c-client.cf with the following contents:
I accept the risk
set disable-plaintext 0and restart inetd:
/etc/init.d/inetd restart
Rocky
10th June 2006, 18:44
Falko,
Thanks once again, as you solved yet another problem that I had. You're the man.
Just one more thing, if I wanted to install a webmail package so that I could access the catchall account, which one would you recommend and how would I install it?
Also, when I log in using IMAP, when I delete mails, it does not remove then from the server. Is there an option that I have to set or is this not possible? The reason for this is that I don't want the catchall account to get overloaded with mails. I just need to keep 2 days of mails in there.
Once again, your suggestions are highly appreciated.
Thanks,
Rocky
falko
10th June 2006, 21:08
Just one more thing, if I wanted to install a webmail package so that I could access the catchall account, which one would you recommend and how would I install it? You can install Squirrelmail or Uebimiau. Both packages come with installation instructions. :)
Also, when I log in using IMAP, when I delete mails, it does not remove then from the server. Is there an option that I have to set or is this not possible? The reason for this is that I don't want the catchall account to get overloaded with mails. I just need to keep 2 days of mails in there. Deleting emails is possible. I guess you didn't use the right option in your email client...
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.