2


I'm trying to create a server on Linux Mint (Cinnamon 19.2) for HTTP (Apache2, Mysql5.7, PHP7.2), FTP, and Email (Postfix, and evetually Dovecot and SquirrelMail or RoundCube, but after I get Postfix running) - the server/domain is nutima-laera.go.ro. HTTP and FTP work just fine, however I have been stuck on Postfix for the last couple of days.
I keep getting:

Oct 24 15:37:35 nutima-laera postfix/qmgr[11832]: BAFBC2034FD: from=<root@nutima-laera.go.ro>, size=357, nrcpt=1 (queue active)
Oct 24 15:37:37 nutima-laera postfix/smtp[13039]: connect to relay1.go.ro[81.196.20.132]:25: Connection refused
Oct 24 15:37:39 nutima-laera postfix/smtp[13039]: connect to relay2.go.ro[81.196.20.132]:25: Connection refused
Oct 24 15:37:39 nutima-laera postfix/smtp[13039]: BAFBC2034FD: to=<speedy_rudolf@yahoo.com>, relay=none, delay=2001, delays=1997/0.01/4.1/0, dsn=4.4.1, status=deferred (connect to relay2.go.ro[81.196.20.132]:25: Connection refused)

Port 25 is not blocked by either firewall (added excetion just to be sure) or isp, I can telnet localhost 25, google.com 25, nutima-laera.go.ro 25 locally and externally. Telnet connects just fine to all of these.

Main.cf:

biff = no

append_dot_mydomain = no

readme_directory = no

compatibility_level = 2

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_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = nutima-laera.go.ro
#myhostname = mail.nutima-laera.go.ro
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = $myhostname, localhost.$mydomain, $mydomain, localhost, mail.nutima-laera.go.ro, nutima-laera.go.ro
relayhost = $mydomain
#mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mynetworks = 192.168.100.0/24, 127.0.0.0/8
mailbox_size_limit = 0
recipient_delimiter = +
inet_protocols = all
mynetworks_style = subnet
#myorigin = $mydomain
myorigin = nutima-laera.go.ro
home_mailbox = Maildir/
inet_interfaces = all

master.cf:

smtp      inet  n       -       y       -       -       smtpd
pickup    unix  n       -       y       60      1       pickup
cleanup   unix  n       -       y       -       0       cleanup
qmgr      unix  n       -       n       300     1       qmgr
#qmgr     unix  n       -       n       300     1       oqmgr
tlsmgr    unix  -       -       y       1000?   1       tlsmgr
rewrite   unix  -       -       y       -       -       trivial-rewrite
bounce    unix  -       -       y       -       0       bounce
defer     unix  -       -       y       -       0       bounce
trace     unix  -       -       y       -       0       bounce
verify    unix  -       -       y       -       1       verify
flush     unix  n       -       y       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
proxywrite unix -       -       n       -       1       proxymap
smtp      unix  -       -       y       -       -       smtp
relay     unix  -       -       y       -       -       smtp
    -o syslog_name=postfix/$service_name
showq     unix  n       -       y       -       -       showq
error     unix  -       -       y       -       -       error
retry     unix  -       -       y       -       -       error
discard   unix  -       -       y       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       y       -       -       lmtp
anvil     unix  -       -       y       -       1       anvil
scache    unix  -       -       y       -       1       scache
maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
uucp      unix  -       n       n       -       -       pipe
  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
ifmail    unix  -       n       n       -       -       pipe
  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp     unix  -       n       n       -       -       pipe
  flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
scalemail-backend unix  -   n   n   -   2   pipe
  flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
mailman   unix  -       n       n       -       -       pipe
  flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
  ${nexthop} ${user}

The comments left are to show some of what i have tried.
I should mention that I did use Webmin for install and initial setup, but after that failed, I started using the terminal.
If there is any other information that you need, I will post it.
Thank you very much.

0

If you are trying to use an external STMP host to send your emails you have to set the host,username and password in /etc/postfix/sasl_passwd:

[mail.host.com] username:password

Then you need to insert this line in main.cf:

 relayhost = [mail.host.com]:25

Also have you checked with your ISP that they are not blocking port 25 as some do, and you have to go around this by using port 2525

| improve this answer | |
  • Hi. Thanks for replying. Like i said in my post, port 25 is not blocked. Telnet to port 25 connects ok. And no, I would like to make my server the SMTP host, not use an external one. Thank you. – Roman Claudiu Oct 25 '19 at 2:59
  • you main conf is not complete, can you post it in full so maybe I or some one can help you. Also mydestination = $myhostname, localhost.$mydomain, $mydomain, localhost is enough no need for the extra domains – Talal Al-Khalifa Oct 25 '19 at 3:20
  • try sending your self an email from the terminal : echo "test message" | mail -s "This is a Subject" -a "From: you@example.com" you@example.com" – Talal Al-Khalifa Oct 25 '19 at 3:25
  • here is a slandered Conf for postfix postfix.org/STANDARD_CONFIGURATION_README.html – Talal Al-Khalifa Oct 25 '19 at 3:32
  • Here is output of mailing myself:<br> Oct 25 06:33:44 nutima-laera postfix/error[1635]: 48E1C2034B4: to=<speedy.rudolf.server@gmail.com>, relay=none, delay=60891, delays=60885/5.6/0/0.38, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to relay2.go.ro[81.196.20.132]:25: Connection refused)<br> Oct 25 06:33:44 nutima-laera postfix/error[1625]: 45BB72034FE: to=<speedy_rudolf@yahoo.com>, relay=none, delay=54799, delays=54793/5.5/0/0.36, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to relay2.go.ro[81.196.20.132]:25: Connection refused)<br> – Roman Claudiu Oct 25 '19 at 3:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.