Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAs

Discussion in 'HOWTO-Related Questions' started by k1piee, Sep 24, 2006.

  1. k1piee

    k1piee New Member

    hello!

    i have a problem whit my mail server. i can't loggin with the users I add to the mysql-database.
    I get this error in /var/log/mail.log :

    and i get some other errors too:

    these files are exakt like he describes in the howto!
    exept the passwoef! :p
    and my main.cf :
    someone who knows what the problem is?
    sorry for my bad english! :p
     
  2. k1piee

    k1piee New Member

    i don't understand why I get this error:

    becuse i can connect to mysql whith phpmyadmin
    and the password are right in the mysql-virtual_domains.cf and the other files,
    someone please help me!! I need to get my mail-server up running as soon as possible!!!
     
  3. falko

    falko Super Moderator

    What's the output of
    Code:
    netstat -tap
    ?
     
  4. k1piee

    k1piee New Member

    here is my netstat -tap:
    I see that mysql isn't there!
    but what should I do to get it working?
     
  5. k1piee

    k1piee New Member

    i've got mysql working proporly now, i think :p
    but now i get this in tunderbird when i try to update my mail:

    Sending of password did not succseed. Mail server Dad3L.org responded: Maildir: No such file or directory.

    whats wrong now?
     
  6. k1piee

    k1piee New Member

    haha, i can send mail without a problem, but when i recive i mail, its not in /home/vmail, its in /var/mail/k1piee.

    this is my main.cf :

    i tought that virtual_mailbox_base = /home/vmail put the mail in "/home/vmail" but apperently not!
    any idea what i should do?
     
  7. k1piee

    k1piee New Member

  8. k1piee

    k1piee New Member

    never mind! got the shit worikng now :D
    apparently i couldn't have "mydestination" and "virtual_alias_domains" as the same value or something, so I change "mydestination" and now it works just fine :D
     
  9. tommytomato

    tommytomato New Member

    thats what I get in my log as well "mydestination" and "virtual_alias_domains"

    my log errors are like so, /var/log/mail.err

    Code:
    Sep 25 14:48:16 localhost courierpop3login: LOGIN FAILED, ip=[::ffff:192.168.1.7]
    Sep 25 15:05:48 localhost dccproc[20028]: socket(UDP): Address family not supported by protocol
    /var/log/mail.warn
    Code:
    Sep 26 00:40:29 localhost postfix/trivial-rewrite[20927]: warning: do not list domain rockinghamgateway.com in BOTH mydestination and virtual_mailbox_domains
    /etc/postfix/mail.cf
    Code:
    recipient_delimiter = +
    inet_interfaces = all
    virtual_alias_domains = 
    virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
    virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
    virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
    virtual_mailbox_base = /home/vmail
    virtual_uid_maps = static:5000
    virtual_gid_maps = static:5000
    smtpd_sasl_auth_enable = yes
    broken_sasl_auth_clients = yes
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
    smtpd_use_tls = yes
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    smtpd_tls_key_file = /etc/postfix/smtpd.key
    virtual_create_maildirsize = yes
    virtual_mailbox_extended = yes
    virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
    virtual_mailbox_limit_override = yes
    virtual_maildir_limit_message = "The user you are trying to reach is over quota."
    virtual_overquota_bounce = yes
    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 $virtual_mailbox_limit_maps
    content_filter = amavis:[127.0.0.1]:10024
    receive_override_options = no_address_mappings
    
    How do I correct the prolbem :confused:

    TT
     
  10. falko

    falko Super Moderator

  11. tommytomato

    tommytomato New Member

    /etc/postfix/main.cf

    I think I fixed this bit

    Code:
    # See /usr/share/postfix/main.cf.dist for a commented, more complete version
    
    smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
    biff = no
    
    # appending .domain is the MUA's job.
    append_dot_mydomain = no
    
    # Uncomment the next line to generate "delayed mail" warnings
    #delay_warning_time = 4h
    
    myhostname = rockinghamgateway.com
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    #mydestination = rockinghamgateway.com, localhost, localhost.localdomain
    mydestination = localhost, localhost.localdomain
    relayhost = 
    mynetworks = 127.0.0.0/8
    mailbox_command = procmail -a "$EXTENSION"
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    virtual_alias_domains = 
    virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
    virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
    virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
    virtual_mailbox_base = /home/vmail
    virtual_uid_maps = static:5000
    virtual_gid_maps = static:5000
    smtpd_sasl_auth_enable = yes
    broken_sasl_auth_clients = yes
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
    smtpd_use_tls = yes
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    smtpd_tls_key_file = /etc/postfix/smtpd.key
    transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
    virtual_create_maildirsize = yes
    virtual_mailbox_extended = yes
    virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
    virtual_mailbox_limit_override = yes
    virtual_maildir_limit_message = "The user you are trying to reach is over quota."
    virtual_overquota_bounce = yes
    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 $virtual_mailbox_limit_maps
    content_filter = amavis:[127.0.0.1]:10024
    receive_override_options = no_address_mappings
    
     
  12. herbie

    herbie New Member

    Quota Warn Messages

    I am pleased with the setup of two servers we did, but I'm having a problem figuring out how to edit the automatic quota messages.

    I don't know if messages are sent by quota, courier, or postfix...

    Users automatically get messages when they are 80%, 90% or over quota and I'd like to alter the message they receive. For example, one message indicates there may be charges for excedding quotas and I'd like to change it to 'call in to increase your mailbox size'.

    Also courious as to how to edit the Spamassassin "whitelist". I'd like to set Spamassassin to delete everything marked as spam instead of simply marking it, but I'd need to have an adequate whitelist first.
    thx
     
  13. falko

    falko Super Moderator

    You can change that in /etc/postfix/main.cf. Have a look at the virtual_maildir_limit_message setting.

    You can set up whitelists in /etc/amavis/amavisd.conf. Have a look at the default /etc/amavis/amavisd.conf that comes with the amavisd package. It has lots of commented examples.
     
  14. herbie

    herbie New Member

    /etc/postfix/main.cf's limit_message is the reply to someone sending to a full mailbox. I was looking for the messages sent to the mailbox users...

    thx for the amavisd tip, I forgot I should use amavis rather than spamassassin for that. If I want to set spamassassin to reject mail classed as spam instead of simply mark it and pass it through, would I also look into the amavisd settings instead?
     
  15. falko

    falko Super Moderator

    You cannot send a message to such a user because his mailbox is full...

    Yes. Have a look at the $final_spam_destiny option.
     

Share This Page