Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Tips/Tricks/Mods

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 24th April 2007, 23:56
cryptic cryptic is offline
Senior Member
 
Join Date: Sep 2006
Posts: 136
Thanks: 5
Thanked 5 Times in 4 Posts
Default Postfix user@domain ?

I was able to get user@domain email login for dovecot working due to this post:

change the line in the /etc/dovecot.conf file

auth_username_format="%Ld_%Ln"

Is there a way to have outgoing email (postfix) work the same with it's authentication?
Reply With Quote
Sponsored Links
  #2  
Old 25th April 2007, 10:27
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,388
Thanks: 833
Thanked 5,485 Times in 4,317 Posts
Default

Quote:
Originally Posted by cryptic
I was able to get user@domain email login for dovecot working due to this post:

change the line in the /etc/dovecot.conf file

auth_username_format="%Ld_%Ln"

Is there a way to have outgoing email (postfix) work the same with it's authentication?
As far as I know, there is no easy solution for postfix. Maybe you can do this by authenticationg against the sasl user database instead of /etc/passwd, but you will have to write a script that adds all email users and passwords to the sasl database.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 25th April 2007, 13:31
Torfinn Nome Torfinn Nome is offline
Junior Member
 
Join Date: Apr 2007
Location: Norway
Posts: 1
Thanks: 0
Thanked 3 Times in 1 Post
Default

Quote:
Originally Posted by cryptic
I was able to get user@domain email login for dovecot working due to this post:

change the line in the /etc/dovecot.conf file

auth_username_format="%Ld_%Ln"

Is there a way to have outgoing email (postfix) work the same with it's authentication?
With Postfix 2.3 or later:

postfix/main.cf:
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth

dovecot/dovecot.conf:
auth default {
# Space separated list of wanted authentication mechanisms:
# plain login digest-md5 cram-md5 ntlm rpa apop anonymous gssapi
mechanisms = plain login
passdb pam {
}
userdb passwd {
}
socket listen {
client {
path = /var/spool/postfix/private/auth
mode = 0660
user = postfix
group = postfix
}
}
}

(From http://www.postfix.org/SASL_README.html#server_dovecot)

--
Torfinn Nome
Reply With Quote
The Following 3 Users Say Thank You to Torfinn Nome For This Useful Post:
cryptic (25th April 2007), radim_h (28th April 2007), till (25th April 2007)
  #4  
Old 25th April 2007, 18:16
cryptic cryptic is offline
Senior Member
 
Join Date: Sep 2006
Posts: 136
Thanks: 5
Thanked 5 Times in 4 Posts
Default

That worked!

Here is my new dovecot.conf file for other interested parties:

-----------------------------------------------

protocols = imap imaps pop3 pop3s

protocol pop3 {
}

protocol lda {
# Address to use when sending rejection mails.
postmaster_address = postmaster@example.com
}

auth_username_format ="%Ld_%Ln"

auth default {
mechanisms = plain login

passdb pam {
}

userdb passwd {
}

socket listen {
client {
path = /var/spool/postfix/private/auth
mode = 0660
user = postfix
group = postfix
}
}
}

dict {
}

plugin {
}
Reply With Quote
The Following User Says Thank You to cryptic For This Useful Post:
falko (26th April 2007)
  #5  
Old 25th April 2007, 19:27
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,388
Thanks: 833
Thanked 5,485 Times in 4,317 Posts
Default

That's a really cool solution I move the thread to the Tipps & Tricks forum.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #6  
Old 28th April 2007, 15:24
radim_h radim_h is offline
Senior Member
 
Join Date: Jan 2007
Location: Prague, Czech
Posts: 420
Thanks: 33
Thanked 24 Times in 19 Posts
Send a message via ICQ to radim_h
Default cannot log in with roundcube

This solution is simply GREAT!

But since i chaged config acording this post, i cannot log into roundcube webmail. Does anyone has idea what to change in RoundCube config?

log:
IMAP Error: Authentication for mydomain.cz_test failed (LOGIN): "a001 NO Authentication failed." in on line 0

Last edited by radim_h; 29th April 2007 at 12:17.
Reply With Quote
  #7  
Old 30th April 2007, 16:48
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,388
Thanks: 833
Thanked 5,485 Times in 4,317 Posts
Default

Do you use a roundcube version that is patched to lookup the username, in your case "mydomain.cz_test" from the virtusertable? if yes, you must deactivate the lookup.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #8  
Old 1st May 2007, 14:19
radim_h radim_h is offline
Senior Member
 
Join Date: Jan 2007
Location: Prague, Czech
Posts: 420
Thanks: 33
Thanked 24 Times in 19 Posts
Send a message via ICQ to radim_h
Default where?

eh, all what was needed is

change
// Path to a virtuser table file to resolve user names and e-mail addresses
$rcmail_config['virtuser_file'] = '/etc/postfix/virtusertable';

to
// Path to a virtuser table file to resolve user names and e-mail addresses
$rcmail_config['virtuser_file'] = '';

Last edited by radim_h; 8th May 2007 at 17:36.
Reply With Quote
  #9  
Old 21st June 2007, 18:15
segemi segemi is offline
Junior Member
 
Join Date: May 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by cryptic
Here is my new dovecot.conf file for other interested parties:

-----------------------------------------------

protocols = imap imaps pop3 pop3s

protocol pop3 {
}

protocol lda {
# Address to use when sending rejection mails.
postmaster_address = postmaster@example.com
}

auth_username_format ="%Ld_%Ln"

auth default {
mechanisms = plain login

passdb pam {
}

userdb passwd {
}

socket listen {
client {
path = /var/spool/postfix/private/auth
mode = 0660
user = postfix
group = postfix
}
}
}

dict {
}

plugin {
}
hello,

I try this parameters in dovecote.conf and when I restart service I have this error :
Restarting mail server: dovecotError: Error in configuration file /etc/dovecot/dovecot.conf line 11: Unknown setting: username_format

I make copy/paste this parameters directly on my dovecot.conf file.

Where is my error ?

Regards,
Olivier
Reply With Quote
  #10  
Old 21st June 2007, 18:19
cryptic cryptic is offline
Senior Member
 
Join Date: Sep 2006
Posts: 136
Thanks: 5
Thanked 5 Times in 4 Posts
 
Default

Quote:
Originally Posted by segemi
hello,

Restarting mail server: dovecotError: Error in configuration file /etc/dovecot/dovecot.conf line 11: Unknown setting: username_format
Olivier
What version of dovecot are you running?
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Issues with Postfix using "Virtual Users And Domains With Postfix, Courier And MySQL" Kyse HOWTO-Related Questions 15 6th January 2007 15:35
Occasional high load on the server. kanour General 5 21st November 2006 11:27
Centos 4.4 32bit Hangs, High Server load 3cwired_com Server Operation 11 16th November 2006 15:47
Verify email setup meekish Installation/Configuration 28 27th October 2006 15:36
postfix starts and stops why lhatle Installation/Configuration 2 21st December 2005 15:20


All times are GMT +2. The time now is 11:52.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.