Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu May 07, 2015 2:50 pm 
Offline
Newbie

Joined: Thu May 07, 2015 2:37 pm
Posts: 2
hello guys im kinda stuck and would be nice if u can give me a hand with that, ive used this guide to set up the mail server: https://www.linode.com/docs/email/postfix/email-with-postfix-dovecot-and-mysql but something is wrong, also ive replaced
Code:
smtpd_recipient_restrictions =
          permit_sasl_authenticated,
          permit_mynetworks,
          reject_unauth_destination

with
Code:
 smtpd_relay_restrictions =
    permit_mynetworks
    permit_sasl_authenticated
    reject_unauth_destination

but nothing changed. i cant receive/send emails at all.

ubuntu 14.04, postfix 2.11.0, dovecot 2.2.9

mail.log
Code:
May  7 20:38:23 raczarnia postfix/smtpd[4175]: connect from hosting0.xxx.xx[123.22.333.44]
May  7 20:38:23 raczarnia postfix/smtpd[4175]: NOQUEUE: reject: RCPT from hosting0.xxx.xx[123.22.333.44]: 454 4.7.1 <login@host.com>: Relay access denied; from=<test@xxx.xx> to=<login@host.com> proto=ESMTP helo=<vv1-xeon.xxx.xx>
May  7 20:38:23 raczarnia postfix/smtpd[4175]: disconnect from hosting0.xxx.xx[123.22.333.44]


main.cf
Code:
 # 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

  smtpd_tls_cert_file=/etc/dovecot/dovecot.pem
  smtpd_tls_key_file=/etc/dovecot/private/dovecot.pem
  smtpd_use_tls=yes
  smtpd_tls_auth_only = yes

  #Enabling SMTP for authenticated users, and handing off authentication to Dovecot
  smtpd_sasl_type = dovecot
  smtpd_sasl_path = private/auth
  smtpd_sasl_auth_enable = yes

  smtpd_relay_restrictions =
    permit_mynetworks
    permit_sasl_authenticated
    reject_unauth_destination
  # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
  # information on enabling SSL in the smtp client.

  myhostname = raczarnia
  alias_maps = hash:/etc/aliases
  alias_database = hash:/etc/aliases
  myorigin = /etc/mailname
  #mydestination = example.com, hostname.example.com, localhost.example.com, localhost
  mydestination = 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

  #Handing off local delivery to Dovecot's LMTP, and telling it where to store mail
  virtual_transport = lmtp:unix:private/dovecot-lmtp

  #Virtual domains, users, and aliases
  virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
  virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
  virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf


Last edited by lukezord on Fri May 08, 2015 3:39 pm, edited 1 time in total.

Top
   
PostPosted: Fri May 08, 2015 2:53 am 
Offline
Senior Member
User avatar

Joined: Sun Jan 18, 2009 2:41 pm
Posts: 830
Have you followed the steps in the troubleshooting guide?

What does your mail log say when you restart Postfix and Dovecot? Your main.cf looks very broken - any line that starts with whitespace (a space or tab) is treated as a continuation of the previous line.

Why did you change smtpd_recipient_restrictions to smtpd_relay_restrictions?

What is the fully qualified domain name of the server (for example, foo.example.com)?


Top
   
PostPosted: Fri May 08, 2015 3:44 am 
Offline
Newbie

Joined: Thu May 07, 2015 2:37 pm
Posts: 2
1. yes

2.
Code:
root@raczarnia:/home/rak# service postfix restart
 * Stopping Postfix Mail Transport Agent postfix                                                                                                                                                                                      [ OK ]
 * Starting Postfix Mail Transport Agent postfix                                                                                                                                                                                      [ OK ]
root@raczarnia:/home/rak# service dovecot restart
dovecot stop/waiting
dovecot start/running, process 8176
root@raczarnia:/home/rak# tail /var/log/mail.log
May  8 09:30:42 raczarnia postfix/smtpd[8020]: connect from unknown[unknown]
May  8 09:30:42 raczarnia postfix/smtpd[8020]: lost connection after CONNECT from unknown[unknown]
May  8 09:30:42 raczarnia postfix/smtpd[8020]: disconnect from unknown[unknown]
May  8 09:32:26 raczarnia postfix/master[6034]: terminating on signal 15
May  8 09:32:27 raczarnia postfix/master[8162]: daemon started -- version 2.11.0, configuration /etc/postfix
May  8 09:32:31 raczarnia dovecot: ssl-params: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
May  8 09:32:31 raczarnia dovecot: auth: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
May  8 09:32:31 raczarnia dovecot: log: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
May  8 09:32:31 raczarnia dovecot: master: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
May  8 09:32:31 raczarnia dovecot: master: Dovecot v2.2.9 starting up (core dumps disabled)


3. it was google found for the 551 relay access denied
4. domain is example.com, smtp/imap/pop3 is under mail.example.com and mail subdomain is mail.example.com

i will check the main.cf in a few hours maybe theres the problem with whitespaces or tabs and ill let you know, also i do a check with smtpd_recipient_restrictions cause it was first thing ive changed and there was other stuff to fix after but i forgot about that


---edit---
so now it works but theres still issue with smtp, imap works i can receive mails but i cant send the mails though, you were right there was mess in my main.cf and also there was missing line in dovecot.conf - postmaster_address
weird cause telnet to my smtp works
Code:
root@raczarnia:~# telnet localhost 465
Trying 127.0.0.1...
Connected to mail.example.com.
Escape character is '^]'.
220 example.com ESMTP Postfix (Ubuntu)


current main.cf
Code:
# 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

smtpd_tls_cert_file=/etc/dovecot/dovecot.pem
smtpd_tls_key_file=/etc/dovecot/private/dovecot.pem
smtpd_use_tls = yes
smtpd_tls_auth_only = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination

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

#smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = raczarnia
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
#mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all

virtual_transport = lmtp:unix:private/dovecot-lmtp

virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf


---edit---

everything works flawless now, seems like thunderbird had some issues with secure smtp - solved it by using roundcube instead


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
RSS

Powered by phpBB® Forum Software © phpBB Group