[SOLVED] Installing Virtualmin after webmin

10 posts / 0 new
Last post
#1 Tue, 03/12/2013 - 12:49
just_me

[SOLVED] Installing Virtualmin after webmin

Hi,

wanted to check something:

Had installed an Ubuntu server and was running it with Webmin for a year. There are Postfix, Fetchmail and Dovecot installations, and although other applications, which were running and sending emails, are working, i can't get the virtual servers from virtualmin to send and receive emails. My Outlook tends to tell me: Mailserver not found; or that the server won't accept any method of authentication.

Unfortunately the severs (host)-name is the same which also applies to a virtual server. And, i hate to say that, but doing a wipe, starting with the install.sh script and reinstall the existing software is not an option, either.

So where can i dig for more information? I know, it is fairly easy, by using the install script, but i'd like to know, what to do in order for solving the mail thing. FTP is working ;-)

Thanks and best j_m

Tue, 03/12/2013 - 14:08
andreychek

Howdy,

Yeah, doing a Virtualmin install after everything else is working is the hard way, but it is indeed possible :-)

You can take a peek at the manual installation instructions here:

https://www.virtualmin.com/documentation/installation/manual

Tue, 03/12/2013 - 14:34
just_me

main .cf containts this already: virtual_alias_maps = hash:/etc/postfix/virtual mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME

So i assume, i did that last year already, interestingley enough, an already installed software can send mails, but virtualmin can't... Also, i will not be able to connect to the mailservers. ...

Thanks for your reply. Best j_m

Tue, 03/12/2013 - 20:29
andreychek

Can you describe exactly what errors it is that you're receiving?

If you look in /var/log/mail.log, do you see additional errors when trying to send email?

-Eric

Wed, 03/13/2013 - 11:36
just_me

I can't send mail via Mail client, since he does not find the mailserver; whatever i try with SSL or without, with TLS or without, I also have errors like this: Error with common authentication, none of the methods provided by IMAP Server are supported by this computer. for SMTP: The server does not support the auth methods provided by this client.

Postfix and Dovecot are up and running, when i use Webmin to send a mail, it claims, mail is successfully sent, But it doesn't arrive. The email i tried to send via webmin i found in postfix as queued, when i clicked on it, it has been sent and arrived. If i send an email with Outlook to an address being on a virtual server, i will get a mail back, which tells me: Email rejected, User unknown in virtual address table.

This is for a new virtual server; if i send an email which is for an virtual server i created yesterday, it won't come back. Very confusing :-(

in the PAM Menu, they list dovecot.

Best

mail.log says this:

warning: do not list domain abc.me in BOTH mydestination and virtual_alias_domains Mar 13 09:08:22 abc postfix/local[32546]: 6FB092742306: to=abc@abc.me, orig_to=abc@def.info, relay=local, delay=22, delays=0.09/0.03/0/22, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME) Mar 13 09:08:22 abc postfix/qmgr[1961]: 6FB092742306: removed

I tried to check connection in Outlook, this created the following in mail.log:

dovecot: imap-login: Disconnected (no auth attempts)

postfix/smtpd[32712]: lost connection after EHLO dovecot: pop3-login: Aborted login (tried to use disabled plaintext auth)

Wed, 03/13/2013 - 11:40
just_me
See /usr/share/postfix/main.cf.dist for a commented, more complete version Debian specific: Specifying a file name will cause the first line of that file to be used as the name. The Debian default is /etc/mailname. myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) biff = no

appending .domain is the MUA's job.

append_dot_mydomain = no

Uncomment the next line to generate "delayed mail" warnings delay_warning_time = 4h

readme_directory = no

TLS parameters

smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key smtpd_use_tls=yes smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for information on enabling SSL in the smtp client.

myhostname = xeo.me alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases

myorigin = /etc/mailname

mydestination = def.eu, abc.me, localhost.me, localhost relayhost = mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all inet_protocols = all virtual_alias_maps = hash:/etc/postfix/virtual mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME smtpd_sasl_authenticated_header = yes

Btw, the What domain to use in outbound mail is being set to "Use hostname" and this:

Send outgoing mail via host

makes me wonder, since the radio button for "Deliver directly" is not being set, but the other one without any host named. So i will give it a try with "Deliver directly". I know, why mail servers always give me headaches :-)

Update: I set it to "Deliver directly" and changed the line with mydetination to:

mydestination = $myhostname, localhost.$mydomain, localhost

Now i can send mails from Webmin and get them. I can also answer them, but i still see this line in mail.log:

Mar 13 09:08:22 abc postfix/local[32546]: 6FB092742306: to=, orig_to=, relay=local, delay=22, delays=0.09/0.03/0/22, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME) Mar 13 09:08:22 abc postfix/qmgr[1961]: 6FB092742306: removed

and therefore it won't be in user's mailbox.

Found also this:

smtpd_sasl_auth_enable = yes smtpd_sasl_security_options = noanonymous broken_sasl_auth_clients = yes smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination check_policy_service inet:127.0.0.1:10023 smtpd_tls_cert_file = /etc/postfix/postfix.cert.pem smtpd_tls_key_file = /etc/postfix/postfix.key.pem smtpd_tls_security_level = may smtpd_tls_mandatory_ciphers = high

Would this do the trick with Outlook?

Wed, 03/13/2013 - 12:52
just_me

i did the following:

  1. Keep Postfix chrooted, so in master.cf you should see this line:

smtp inet n - - - - smtpd

  1. Edit /etc/default/saslauthd like this:

START = yes

OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd -r"

(I found out without the trailing -r it wouldnt work.)

  1. Created the file /etc/postfix/sasl and enter the following lines

pwcheck_method: saslauthd mech_list: plain login

  1. in the systemshell i entered:

adduser postfix sasl

  1. Restarted both

/etc/init.d/postfix restart /etc/init.d/saslauthd restart

Hope, i didn't forget anything. My imap is not working yet, it keeps telling: problem with common authentification. SMTP worked, but claims now Error 451 4.3.5 Server config problem .

Wed, 03/13/2013 - 19:54
andreychek

Howdy,

Hmm, as far as that Dovecot issue goes -- if you restart dovecot, and then take a peek in your email log (in /var/log/mail.log), do any errors appear in there?

-Eric

Thu, 03/14/2013 - 08:04
just_me

Problem now is receiving emails in imap account. The mail.log file doesn't give any clue, looks like it is processed correctly, but the mails do not arrive in the mailbox. The according entry from mail.log:

Mar 14 09:53:19 abc postfix/smtpd[27651]: connect from mail-ee0-f46.google.com[74.125.83.46] Mar 14 09:53:19 abc postfix/smtpd[27651]: EF744274202E: client=mail-ee0-f46.google.com[74.125.83.46] Mar 14 09:53:20 abc postfix/cleanup[27656]: EF744274202E: message-id=007f01ce2082$528aa002e0$@gmail.com Mar 14 09:53:20 abc postfix/qmgr[27649]: EF744274202E: from=me@googlemail.com, size=5252, nrcpt=1 (queue active) Mar 14 09:53:20 abc postfix/smtpd[27651]: disconnect from mail-ee0-f46.google.com[74.125.83.46] Mar 14 09:53:24 abc postfix/local[27657]: EF744274202E: to=info.def@abc.me, orig_to=info@def.info, relay=local, delay=4.1, delays=0.17/0/0/4, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME) Mar 14 09:53:24 abc postfix/qmgr[27649]: EF744274202E: removed

Something confuses me:

It says orig_to=info@def.info but to=info.def@abc.me. Is this correct or part of the problem?

This is the only problem besides the one with the scripts i can't install...

Thank you for help.

Best

PS: I checked around a little and found out, that this settings in procmailrc weren't as you pointed out in another post: First, take a look at /etc/procmailrc, and check the values of ORGMAIL and DEFAULT -- they should both be set to "$HOME/Maildir/".

Second, if you look at /etc/postfix/main.cf, make sure that "home_mailbox" is set to "Maildir/"

Thu, 03/14/2013 - 08:06
just_me

looks good at the moment, i looked into the procmail conf file and found out, that the spamrules were partly commented out:

|# /usr/bin/spamassassin :#0

* X-Spam-Status: Yes

$HOME/spam DROPPRIVS=yes

Where this comes from? Don't know.

I uncommented this three lines and voila, seems to work now. will doublecheck and find out, whether everything still works.

Pheeew...

Thank you!

Topic locked