Question

E-Mail - Proper Domain (myorigin) - always xx@localhost.domain.cf - DOVECOT

  • Posted on May 3, 2014
  • robertsAsked by roberts

After 16 long hours I’ve finally fought through and made a E-Mail server. Still have some rough finishes, and some problems, I can’t figure out on my own. So, as a first post, I must ask for help.

Here is my configuration for Dovecot :: main.cf

BASIC CONFIGURATION

myhostname = mail.domain.cf mydomain = domain.cf myorigin = $mydomain mydestination = mail.domain.cf, domain.cf, localhost relayhost = mynetworks = 127.0.0.0/8

Everything works fine - but not that mydomain string. It just wouldn’t do and convert it like a proper string should do. I tried changing origin, removing mydestination and all other possible things my imagination can do.

Still, using mail function and sending to my personal e-mail address will result in this:

Return-path: roberts@localhost.domain.cf Envelope-to: roberts@mysite.lv Delivery-date: Fri, 02 May 2014 21:05:08 -0500 Received: from [188.226.228.103] (port=36029 helo=mail.domain.cf) by somehosting.lv with esmtp (Exim 4.82) (envelope-from roberts@localhost.domain.cf) id 1WgPK8-0004Lx-4J for roberts@mysite.lv; Fri, 02 May 2014 21:05:08 -0500 Received: by mail.domain.cf (Postfix, from userid 1002) id 3D3BE1231B8; Fri, 2 May 2014 22:05:07 -0400 (EDT) To: roberts@mysite.lv Subject: Hey, what’s up? X-Mailer: mail (GNU Mailutils 2.99.98) Message-Id: 20140503020507.3D3BE1231B8@mail.domain.cf Date: Fri, 2 May 2014 22:05:07 -0400 (EDT) From: roberts@localhost.domain.cf (Roberts)

I’ve tried some relays - but then it just didn’t send. I’m not actually caring as much for how it looks - but that’s my server, and I’m trying to integrate RainLoop on top of it.

Managed to finally get a connection - but I can’t sign in using non-root user with simpleguy@domain.cf

localhost dovecot: auth-worker(2098): Error: pam(simpleguy@domain.cf,188.226.xxx.xxx): pam_authenticate() failed: Authentication failure (/etc/pam.d/imap missing?)

localhost dovecot: imap-login: Disconnected (auth failed, 1 attempts in 5 secs): user=simpleguy@domain.cf, method=PLAIN, rip=188.226.xxx.xxx, lip=188.226.xxx.xx$

It’s same for Thunderbird. Can’t log-in. Not sure why.

Would be greatly appreciated, if you could help me deal with this problem, as well as giving tips for the second one (disconnects). I DID learn a lot today already.

Here’s the additional info, if you are looking to help me:

From what I gathered, there is something limiting SSH/SSL connections.

DEBUG INFO:

SSL SETUP @ main.cf - // POSTFIX

smtpd_tls_cert_file=/etc/ssl/certs/dovecot.pem smtpd_tls_key_file=/etc/ssl/private/dovecot.pem smtpd_use_tls=yes smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache smtpd_tls_security_level=may smtpd_tls_protocols = !SSLv2, !SSLv3

#FULL DOVECOT.CONF

disable_plaintext_auth = no mail_privileged_group = mail

userdb { driver = passwd } passdb { driver = pam args = %s }

protocols = “imap”

service imap-login { inet_listener imap { port = 143 } inet_listener imaps { port = 993 ssl = yes } }

protocol imap { mail_plugins = " autocreate" }

plugin { autocreate = Trash autocreate2 = Sent autosubscribe = Trash autosubscribe2 = Sent }

service auth { unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0660 user = postfix } }

ssl=yes ssl_cert = </etc/ssl/certs/dovecot.pem ssl_key = </etc/ssl/private/dovecot.pem

mail_location = mbox:~/mail:INBOX=/var/mail/%u


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

To restart dovecot, use: <br> <br><pre> <br>sudo service dovecot restart <br></pre> <br> <br>

I would like to also add - that due to reinstalling (did purge tho) Dovecot - I messed up it’s “daemon”. After sudo stop - it just gets back on the horse. /etc/init.d/dovecot is unresponsive as well (did import new config even). <br> <br>I’ve been treating him real nice, and even managed to do what I needed to do - lauch IMAP services, and even green, since I fixed SSL cert.s. <br> <br>Would be great, if someone would give tips to restore daemon (maybe postfix is starting it - I don’t know for sure) - but other that rebooting I don’t see much options, and that can’t be option, when I finalize my build. <br> <br>Thanks.