Postfix check_recipient_access?

Discussion in 'Installation/Configuration' started by Rocky, Jun 7, 2006.

  1. Rocky

    Rocky Member

    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.
     
    Last edited: Jun 7, 2006
  2. falko

    falko Super Moderator ISPConfig Developer

    Does your Postfix use system users or virtual users?
     
  3. Rocky

    Rocky Member

    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.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Is this a maildir or mbox account?
     
  5. Rocky

    Rocky Member

    How would I be able to tell if its a maildir or mbox account?
     
  6. falko

    falko Super Moderator ISPConfig Developer

    What's the output of
    Code:
    postconf -n |grep home_mailbox
    and
    Code:
    postconf -d |grep home_mailbox
    ?
     
  7. Rocky

    Rocky Member

    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?
     
    Last edited: Jun 8, 2006
  8. falko

    falko Super Moderator ISPConfig Developer

    You posted the wrong output. I asked for
    Code:
    postconf -n |grep home_mailbox
    and
    Code:
    postconf -d |grep home_mailbox
     
  9. Rocky

    Rocky Member

    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.
     
    Last edited: Jun 8, 2006
  10. falko

    falko Super Moderator ISPConfig Developer

    You're already using mbox.

    Run
    Code:
    apt-get install ipopd-ssl uw-imapd-ssl
    Then create the file /etc/c-client.cf with the following contents:

    Code:
    I accept the risk
    set disable-plaintext 0
    and restart inetd:

    Code:
    /etc/init.d/inetd restart
     
  11. Rocky

    Rocky Member

    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
     
  12. falko

    falko Super Moderator ISPConfig Developer

    You can install Squirrelmail or Uebimiau. Both packages come with installation instructions. :)

    Deleting emails is possible. I guess you didn't use the right option in your email client...
     

Share This Page