PDA

View Full Version : Howto: set up a mail server in Ubuntu



Pages : 1 2 [3]

wantdownload
October 5th, 2014, 03:18 AM
Thanks man it worked for me. I appreciate it!

crossRT
October 12th, 2014, 04:56 AM
This tutorial is great!! So far my server is able to send and receive mail by telnet.
But there is some problem while log in with SquirrelMail, it show "unknown user or password incorrect".
i log in with
username@mydomain.com
but it doesn't work.
Anyone having same problem but solved can give me some clues?

crossRT
October 12th, 2014, 05:15 AM
This tutorial is great!! So far my server is able to send and receive mail by telnet.
But there is some problem while log in with SquirrelMail, it show "unknown user or password incorrect".
i log in with
username@mydomain.com
but it doesn't work.
Anyone having same problem but solved can give me some clues?

Sorry guys, it is work after i restart my server. Problem solved.

David_Goodnature
October 14th, 2014, 05:45 PM
Ubuntu 14.04 64-bit (60GB VHDD, 2x 2 Cores, 2GB, 16MB video all as a VM on WMware ESXi server)
Shorewall (4.5.21.6-1 -- I think?)

I started to going through this how-to with another distro thinking it was pretty straight forward, but I quicklky ran into hipcups not finding any available source code for several packages (i.e. PostGrey - it's just gone) and confused about other items. Seeking a slightly easier road for success, I decided to simply do it by the book only to find versioning (directory and layout) problems.

The documentation doesn't seem to line up with with the 'apt-get install shorewall shorewall-doc' delivered goods.
The "/default-config" folder just doesn't exist within "/usr/share/doc/shorewall", but instead I have "/examples" with sub-folders "/Universal", "/one-interface", "/two-interfaces", and "/three-interfaces". There is no example "hosts" files to work with, and I'm not keen on making one up not knowing what the format inside the file ought to be. Some of the steps seem depreciated as Shorewall appears to prefer "Format 2" now, while the how-to appears to be using "Format 1" (the "detect" parameter tipped me off and I didn't know where to put it). Getting web servers up is fairly easy and straight forward.

Can you be more specific on how you got this to work? I've been stuck on this all morning. Thank you!

spraitas
November 4th, 2014, 11:10 AM
I have a mail server setup and the manual by Ivar was great resource in helping me.

But issues with the Cyrus/saslauthd service started... The service started to act weird after working for a while and i needed to restart it from time to time. This error was generated in the logs:
DEBUG: auth_pam: pam_authenticate failed: Memory buffer error

After checking some forums and documentation, I've found out that there are some configuration mistakes present in the guide:
In /etc/postfix/sasl/smtpd.conf i had to change from:

pwcheck_method: saslauthd
mech_list: plain login cram-md5 digest-md5
log_level: 7
allow_plaintext: true
auxprop_plugin: sql
sql_engine: mysql
sql_hostnames: 127.0.0.1
sql_user: mail
sql_passwd: mailPASSWORD
sql_database: maildb
sql_select: select crypt from users where id='%u@%r' and enabled = 1
to:


pwcheck_method: saslauthd
mech_list: plain login

Here is the related doc that explains why the configuration of saslauthd needs only two mechanisms when pwcheck_method is saslauthd:
http://www.postfix.org/SASL_README.html#saslauthd

I guess an alternative way of configuration fix would be to use:

pwcheck_method: auxprop
But then we would need to skip the "pam" config entirely...

Also to fix the "auxpropfunc error no mechanism available" error remove the libsasl sql module:
sudo apt-get remove libsasl2-modules-sql

NielsNL
January 21st, 2015, 01:39 PM
Just did an install on a fresh ubuntu server. Didn't totally work out as I hoped, at first there was a space after my password, my bad.
I had to configure roundcube to use a plain password, while the mySQL only has encrypted passwords in the database. The same goes for firebird/IceDove.
Also IceDove doesn't create the draft, sent etc... folders, that only happens when I log in with Roundcube.

Now I still can't send mail I get SMTP Error (554): Failed to add recipient "name@domain.tld" (5.7.1 <localhost[::1]>: Client host rejected: Access denied).
When I do a telnet to port 25, I can sent mail manualy, but when I try port 587, I get that error... Kind a strange...

Maybe I am going to fix the cram-md5, or going to use a tutorial with dovecot...
I guess it didn't work because my passwords start with $5$, which is SHA256-crypt (http://wiki2.dovecot.org/Authentication/PasswordSchemes)...