Current User: Guest Login Register
Please consider registering


Register? | Lost Your Password?

Search Forums:


 






Minimum search word length is 4 characters – Maximum search word length is 84 characters
Wildcard Usage:
*  matches any number of characters    %  matches exactly one character

Problem with postfix smtp authentication using dovecot

Reply to Post Add a New Topic
UserPost

8:28 am
December 27, 2009


atanu

Member

posts 9

I am using RHEL 5 with the following postfix and dovecot version -

[root@linux1 ~]# rpm -qa | grep postfix
postfix-2.3.3-2
[root@linux1 ~]# rpm -qa | grep dovecot
dovecot-1.0-1.2.rc15.el5
[root@linux1 ~]#

My postfix server is running fine.  While enabling smtp auth I have floowed the following article -

http://www.linuxmail.info/post…..ecot-sasl/

I have a failure to enable smtp auth. 

The problem is, the system is not asking user to supply password -

Here are some outputs that may help you to identify the problem -

Output 1

telnet 192.168.254.103 25
Trying 192.168.254.103…
Connected to linux1 (192.168.254.103).
Escape character is '^]'.
220 linux1.banerjee.com ESMTP Postfix
ehlo banerjee.com
250-linux1.banerjee.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN

250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
mail from:atanu@banerjee.com
250 2.1.0 Ok
rcpt to:banerjee@banerjee.com
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
testing mail
.
250 2.0.0 Ok: queued as 062046DD8C
quit
221 2.0.0 Bye
Connection closed by foreign host.

The system is simply not asking to supply password, and the mail is getting delivered to destination.

Output 2

[root@linux1 sasl2]# telnet 192.168.254.103 25
Trying 192.168.254.103…
Connected to linux1 (192.168.254.103).
Escape character is '^]'.
220 linux1.banerjee.com ESMTP Postfix
ehlo banerjee.com
250-linux1.banerjee.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
mail from:atanu@banerjee.com
250 2.1.0 Ok
auth plain AGF0YW51AGE=
235 2.0.0 Authentication successful
quit
221 2.0.0 Bye
Connection closed by foreign host.
[root@linux1 sasl2]#

Please check, the system is accepting password, but not forcing it supply while sending mail.

The private/auth file exists -

Output 3

[root@linux1 private]# pwd && ls -l auth
/var/spool/postfix/private
srw-rw—- 1 postfix postfix 0 Dec 27 18:06 auth
[root@linux1 private]#

The dovecot service and corresponding ownership -

Output 4

[root@linux1 spool]# ps -ef | grep dovecot
root     13678     1  0 18:06 ?        00:00:01 /usr/sbin/dovecot
root     13680 13678  0 18:06 ?        00:00:00 dovecot-auth
dovecot  13681 13678  0 18:06 ?        00:00:01 pop3-login
dovecot  13682 13678  0 18:06 ?        00:00:00 pop3-login
dovecot  13683 13678  0 18:06 ?        00:00:01 pop3-login
dovecot  13971 13678  0 18:46 ?        00:00:00 imap-login
dovecot  13984 13678  0 18:51 ?        00:00:00 imap-login
dovecot  14006 13678  0 18:56 ?        00:00:00 imap-login

Output 5

[root@linux1 spool]# postconf -a
cyrus
dovecot
[root@linux1 spool]#

The main.cf and dovecot.conf is modified as it is suggested in http://www.linuxmail.info/post…..ecot-sasl/

Please help me to enforce smtp auth.  I want to force user to supply password while sending mail.

Atanu

6:33 pm
December 27, 2009


consultant

Admin

posts 341

Hi atanu,

This is the correct behavior as noted in the article.

"You can send to email addresses belonging to your domain without authentication. This is normal as it enables you to receive mail from the outside."

4:31 am
December 30, 2009


atanu

Member

posts 9

Thanks for the reply.

But it is also allowing me to send mail outside my domain without authentication.

Please help.

Atanu

5:34 pm
December 30, 2009


consultant

Admin

posts 341

Hi atanu,

Please post the output of

postconf -n

5:16 am
December 31, 2009


atanu

Member

posts 9

Hi

Thanks for the response.  Please find the output below -

[root@linux1 private]# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
html_directory = no
inet_interfaces = all
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = banerjee.com linux1.banerjee.com
myhostname = linux1.banerjee.com
mynetworks = 192.168.254.96/28, 127.0.0.1
myorigin = banerjee.com
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
sample_directory = /usr/share/doc/postfix-2.3.3/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
unknown_local_recipient_reject_code = 550
[root@linux1 private]#

#####

Please also find the output, shows my user from banerjee.com is able to send mail to users in gmail.com without smtp auth-

[root@linux1 private]# telnet 192.168.254.103 25
Trying 192.168.254.103…
Connected to 192.168.254.103 (192.168.254.103).
Escape character is '^]'.
ehlo banerjee.com
220 linux1.banerjee.com ESMTP Postfix
250-linux1.banerjee.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
mail from:atanu@banerjee.com
250 2.1.0 Ok
rcpt to:banerjee@gmail.com
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
testing mail
.
250 2.0.0 Ok: queued as DA16D6DD70
quit
221 2.0.0 Bye
Connection closed by foreign host.
[root@linux1 private]#

Thanks again.

7:03 am
December 31, 2009


consultant

Admin

posts 341

Hi atanu,

mynetworks should be

mynetworks = 127.0.0.1

Thus 192.168.254.103 was a trusted IP.

1:09 am
January 1, 2010


atanu

Member

posts 9

Got the desired result !!!!  Thank you very much.

[root@rhel4 ~]# telnet 192.168.254.103 25
Trying 192.168.254.103…
Connected to linux1.banerjee.com (192.168.254.103).
Escape character is '^]'.
220 linux1.banerjee.com ESMTP Postfix
ehlo banerjee.com
250-linux1.banerjee.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
mail from:atanu@banerjee.com
250 2.1.0 Ok
rcpt to:banerjee@gmail.com
554 5.7.1 <banerjee@gmail.com>: Relay access denied
auth plain AGF0YW51AGE=
235 2.0.0 Authentication successful
rcpt to:banerjee@gmail.com

250 2.1.5 Ok
quit
221 2.0.0 Bye
Connection closed by foreign host.
[root@rhel4 ~]#

Thank you again.

Reply to Post

Reply to Topic:
Problem with postfix smtp authentication using dovecot

Guest Name (Required):

Guest Email (Required):

Smileys
Confused Cool Cry Embarassed Frown Kiss Laugh Smile Surprised Wink Yell
Post New Reply

Guest URL (required)

Math Required!
What is the sum of:
3 + 1
   


About the Linux Mail Server Setup and Howto Guide Forum

Forum Timezone: America/New_York

Most Users Ever Online: 60

Currently Online:
11 Guests

Currently Browsing this Topic:
1 Guest

Forum Stats:

Groups: 2
Forums: 5
Topics: 326
Posts: 1012

Membership:

There are 928 Members
There have been 84 Guests

There is 1 Admin

Top Posters:

shanmugasundaram s – 45
Kendermin – 15
Ginger – 14
bighorn – 14
iron_michael86 – 12
Raminda – 11

Recent New Members: RaHuL, bikesh, pappy_says, geos, boudi7, dara.hr

Administrators: consultant (341 Posts)