Client host rejected: when relaying using POP mail client

Discussion in 'Server Operation' started by nanwer, May 3, 2007.

  1. nanwer

    nanwer New Member

    Hi everyone

    I have setup an ISP style mail system using postfix, dovecot, squirrelmail and mysql on ubuntu server 7.04. Everything seems to be working fine with sending recieving emails but relaying on submission service (port 587). I want to allow any client to be able to relay as long as they AUTH using dovecot SASL and are valid users regardless of what IP/host they come in from. Here is what I have in my to enable submission service:

    submission inet n - - - - smtpd
    -o smtpd_enforce_tls=no
    -o smtpd_sasl_auth_enable=yes
    -o smtpd_client_restrictions=permit_sasl_authenticated,reject

    My file looks like this:

    queue_directory = /var/spool/postfix
    command_directory = /usr/sbin
    daemon_directory = /usr/lib/postfix
    mail_owner = postfix
    myhostname = mail.domainname.tld
    mydomain = domainname.tld
    myorigin = $myhostname
    inet_interfaces = $myhostname
    inet_protocols = ipv4
    mydestination = $myhostname
    unknown_local_recipient_reject_code = 550
    mynetworks_style = host
    mynetworks =
    relay_domains = $mydestination
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    sendmail_path = /usr/sbin/sendmail
    newaliases_path = /usr/bin/newaliases
    mailq_path = /usr/bin/mailq
    setgid_group = postdrop
    transport_maps = proxy:mysql:/etc/postfix/mysql/
    virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql/
    virtual_mailbox_base = /srv/mail
    virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql/
    virtual_alias_maps = proxy:mysql:/etc/postfix/mysql/, proxy:mysql:/etc/postfix/mysql/
    virtual_minimum_uid = 8
    virtual_uid_maps = static:8
    virtual_gid_maps = static:8
    dovecot_destination_recipient_limit = 1
    smtpd_use_tls = no
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_security_options = noanonymous
    broken_sasl_auth_clients = yes
    smtpd_sasl_type = dovecot
    smtpd_sasl_path = private/auth
    strict_rfc821_envelopes = yes
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, reject_non_fqdn_recipient, reject_unknown_recipient_domain

    When I try to relay using Outlook, I see the following message in the mail.log:

    May 3 00:36:33 mail postfix/smtpd[10004]: connect from[]
    May 3 00:36:33 mail postfix/smtpd[10004]: NOQUEUE: reject: RCPT from[]: 554 5.7.1 <[]>: Client host rejected: Access denied; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<mycomputer>
    May 3 00:36:33 mail postfix/smtpd[10004]: disconnect from[]
    May 3 00:36:33 mail dovecot: pop3-login: Login: user=<[email protected]>, method=PLAIN, rip=,
    May 3 00:36:33 mail dovecot: POP3([email protected]): Disconnected: Logged out top=0/0, retr=0/0, del=0/626, size=27305010

    I have tried several options for the last 2 days but have not been able to get past in relaying email for valid-users from any/all clients.

    Any help is much appreciated.

    Thanks in advance.
  2. falko

    falko Super Moderator ISPConfig Developer

    Does SMTP-AUTH work on port 25?
  3. nanwer

    nanwer New Member

    Not for the external client relay.
  4. falko

    falko Super Moderator ISPConfig Developer

    Did you enable "Server requires authentication." in your email client?
  5. nanwer

    nanwer New Member

    The problem is resolved.

    I was missing the "login" for the mechanism in dovecot.conf:

    mechanisms = plain login

    Thanks anyways for looking into this.

Share This Page