Virtual Users And Domains With Postfix, Courier And MySQL (mail not relaying)

Discussion in 'Server Operation' started by RinoM1, Nov 11, 2006.

  1. RinoM1

    RinoM1 New Member

    Hi Falko,

    Thanks for the tutorial, realy good, but I have a small problem.

    I've got the mail working, I can send mail intenaly, I can recieve internal and external. how ever, I cannot send outsite my network. I've trying many things, but so far no luck. Below are my result and configuration, I must of missed something, any suggestion?

    Here is the error:
    Nov 10 18:04:45 web postfix/smtpd[31698]: connect from unknown[192.168.x.x]
    Nov 10 18:04:45 web postfix/smtpd[31698]: NOQUEUE: reject: RCPT from unknown[192.168.x.x]: 554 <RinoM1@OtherDomain.ca>: Relay access denied; from=<RinoM1.myVirturalDomain.ca> to=<RinoM1@OtherDomain.ca> proto=SMTP helo=<RinoM1>
    Nov 10 18:04:45 web postfix/smtpd[31698]: disconnect from unknown[192.168.X.X]

    queue_directory = /var/spool/postfix
    command_directory = /usr/sbin
    daemon_directory = /usr/libexec/postfix
    mail_owner = postfix
    inet_interfaces = all
    mydestination = my.domain.ca, localhost, localhost.localdomain
    unknown_local_recipient_reject_code = 550
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    debug_peer_level = 99
    debug_peer_list = 127.0.0.1
    debugger_command =
    PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
    xxgdb $daemon_directory/$process_name $process_id & sleep 5
    sendmail_path = /usr/sbin/sendmail.postfix
    newaliases_path = /usr/bin/newaliases.postfix
    mailq_path = /usr/bin/mailq.postfix
    setgid_group = postdrop
    html_directory = no
    manpage_directory = /usr/share/man
    sample_directory = /usr/share/doc/postfix-2.2.8/samples
    readme_directory = /usr/share/doc/postfix-2.2.8/README_FILES
    myhostname = web.brmpt.morinsoft.ca
    mynetworks = 127.0.0.0/8
    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

    this is the resulst from telnet localhost 25 and manualy sending message


    Nov 10 18:55:56 web postfix/smtp[30445]: vstream_buf_get_ready: fd 11 got 86
    Nov 10 18:55:56 web postfix/smtp[30445]: < 127.0.0.1[127.0.0.1]: 250 2.6.0 Ok, id=28449-02, from MTA([127.0.0.1]:10025): 250 Ok: queued as 5358B261E7
    Nov 10 18:55:56 web postfix/smtp[30445]: A929F261CE: to=<RinoM1@otherDomain.ca>, relay=127.0.0.1[127.0.0.1], delay=6, status=sent (250 2.6.0 Ok, id=28449-02, from MTA([127.0.0.1]:10025): 250 Ok: queued as 5358B261E7)
    Nov 10 18:55:56 web postfix/smtp[30445]: rec_put_type: 68 at 282
    Nov 10 18:55:56 web postfix/smtp[30445]: vstream_fflush_some: fd 10 flush 1
    Nov 10 18:55:56 web postfix/smtp[30445]: name_mask: resource
    Nov 10 18:55:56 web postfix/smtp[30445]: name_mask: software
    Nov 10 13:55:56 web postfix/qmgr[28394]: 5358B261E7: removed
    Nov 10 13:56:07 web pop3d: Connection, ip=[::ffff:67.71.177.227]
    Nov 10 13:56:07 web authdaemond: received auth request, service=pop3, authtype=login
    Nov 10 13:56:07 web pop3d: LOGIN, user=RinoM1@myVirtualDomain.ca, ip=[::ffff:67.71.177.227]
    Nov 10 13:56:07 web authdaemond: authmysql: trying this module
    Nov 10 13:56:07 web authdaemond: SQL query: SELECT email, password, "", 5000, 5000, "/home/vmail", CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/'), quota, "", "" FROM users WHERE email = "RinoM1@myVirtualDomain.ca"
    Nov 10 13:56:07 web authdaemond: password matches successfully
    Nov 10 13:56:07 web authdaemond: authmysql: sysusername=<null>, sysuserid=5000, sysgroupid=5000, homedir=/home/vmail, address=RinoM1@myVirtualDomain.ca, fullname=<null>, maildir=myVirtualDomain.ca/RinoM1/, quota=10485760, options=<null>
    Nov 10 13:56:07 web authdaemond: authmysql: clearpasswd=<null>, passwd=ufjZF6prr7pjk
    Nov 10 13:56:07 web authdaemond: Authenticated: sysusername=<null>, sysuserid=5000, sysgroupid=5000, homedir=/home/vmail, address=RinoM1.myVirturalDomain.ca, fullname=<null>, maildir=myVirturalDomain.ca/RinoM1/, quota=10485760, options=<null>
    Nov 10 13:56:07 web authdaemond: Authenticated: clearpasswd=Sumr4Lnx, passwd=ufjZF6prr7pjk
    Nov 10 13:56:07 web pop3d: LOGOUT, user=RinoM1.myVirturalDomain.ca, ip=[::ffff:67.71.177.227], top=0, retr=2161, rcvd=34, sent=2371, time=0
     
    Last edited: Nov 11, 2006
  2. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    Please make sure you enabled "Server requires authentication." in your email client because otherwise you get this "Relay access denied" error.
     

Share This Page