Need help setting up postfix

Hi guys,

I am trying to setup potfix (for my own personal curiosity) and see how it goes. I am doing this on my home PC, with OpenSUSE 13.1. I managed to get the postfix daemon started, and setup a mysql db(MariaDB) as well as setup the apache for postfix admin. However I am not sure what to do next. I have a domainname → techfornoobs.info, however I am not 100% sure I got the DNS records setup correctly either. Despite this, I should be able to send mail from the server. When I try to send an e-mail from the postfix admin interface, in the logs I get this:

2014-07-07T21:08:00.044266+03:00 Beliskner postfix/smtp[1690]: connect to gmail-smtp-in.l.google.com[74.125.136.26]:25: No route to host
2014-07-07T21:08:00.044909+03:00 Beliskner postfix/smtp[1690]: connect to gmail-smtp-in.l.google.com[2a00:1450:4013:c01::1a]:25: Network is unreachable
2014-07-07T21:08:00.045390+03:00 Beliskner postfix/smtp[1690]: connect to alt1.gmail-smtp-in.l.google.com[2607:f8b0:400e:c03::1a]:25: Network is unreachable

I was trying to send to my own gmail account. Now, if it was an encryption issue( I am using default smtp 25 and pop3 110 ports) I was expecting to see connection refused or something other than this. The computer is behind a router and the ports are forwarded properly.

Also, I created a mailbox in postfix admin, and I’d like to be able to connect to it using thunderbird. I cannot figure out how though and I don’t know where to find the postfix config file for that. Should I also post my /etc/postfix/main.cf ? (I also turned off the firewall altogether for now so it can’t be a firewall issue. Does anybody have more experience with this or any ideas on this? Any help will be greatly appreciated.

Kind Regards

Things that come to my mind:

  • Your ISP is blocking port 25
  • IPV6 is acting up, you can change it by editing /etc/postfix/main.cf, find inet_protocols at the bottom and change it to inet_protocols = ipv4 then restart postfix.

From what I can tell and from a test performed on he ISP indeed, port 25 is blocked. As far as I can tell port 587 with most e-mail provider requires encryption (SSL or TLS) when sending directly to the recipient host via the MX records. If so, do you have any instructions on how to enable sending through 587 and setup a free certificate?

Kind Regards,

Quick question, can you tell by looking at the records if all is setup ok for receiving? Should I at least be able to receive when sending from my gmail to vasser@techfornoobs.info(the current postfix config). My DNS records are as follows:

[67.222.132.198] returned a non-authoritative response in 250 ms:

Answer records
name
techfornoobs.info

[TR]
[TD]server:|ns69.domaincontrol.com|
|email:|dns@jomax.net|
|serial:|2014070700|
|refresh:|28800|
|retry:|7200|
|expire:|604800|
|minimum ttl:|600|

[/TD]
[TD=“align: right”]3600s[/TD]
TD[/TD]
[/TR]
[TR]
[TD]techfornoobs.info[/TD]
[TD]IN[/TD]
[TD]A[/TD]
[TD]178.156.145.46[/TD]
[TD=“align: right”]3600s[/TD]
TD[/TD]
[/TR]
[TR]
[TD]techfornoobs.info[/TD]
[TD]IN[/TD]
[TD]MX[/TD]
[TD]|preference:|0|
|—|—|
|exchange:|beliskner.techfornoobs.info -->this is the FQDN of the host
|

[/TD]
[TD=“align: right”]3600s
[/TD]
TD[/TD]
[/TR]
[TR]
[TD]techfornoobs.info[/TD]
[TD]IN[/TD]
[TD]NS[/TD]
[TD]ns69.domaincontrol.com[/TD]
[TD=“align: right”]3600s[/TD]
TD[/TD]
[/TR]
[TR]
[TD]techfornoobs.info[/TD]
[TD]IN[/TD]
[TD]NS[/TD]
[TD]ns70.domaincontrol.com[/TD]
[TD=“align: right”]3600s[/TD]
TD[/TD]
[/TR]
[TR]
[TD]techfornoobs.info
[/TD]
[TD]IN[/TD]
[TD]TXT[/TD]
[TD]v=spf1 mx a ip4:178.156.145.46/32 a:beliskner.techfornoobs.info ~all[/TD]
[TD=“align: right”]3600s[/TD]
TD
|beliskner.techfornoobs.info
|
|IN
|CNAME|techfornoobs.info|3600s|(1h)|

[/TD]
[/TR]
[TR]
[TD=“colspan: 3”]Authority records
[/TD]
[/TR]
[/TABLE]

Here is my main.cf file. I am not sure if It was right not to set the mynetworks_style at all. I am thinking that not setting it will default to allowing all clients to send mail from this server. However I still can’t get thunderbird to connect to it.

https://docs.google.com/document/d/1HH1FBbeetfG2HGhU-sRO7AoZKthFL7uIvMQxKnFxkVU/edit?usp=sharing

Thanks

On 2014-07-07 20:26, vaseer wrote:
>
> Hi guys,
>
> I am trying to setup potfix (for my own personal curiosity) and see how
> it goes. I am doing this on my home PC, with OpenSUSE 13.1.

Ok, good :slight_smile:

> I managed to
> get the postfix daemon started, and setup a mysql db(MariaDB) as well as
> setup the apache for postfix admin.

Wow, now that is getting complicated!

Normally, I would advise on getting postfix to simply work, with the
minimal configuration possible (which typically means what YaST would do
for you), then add things later, after testing it.

> However I am not sure what to do
> next. I have a domainname → techfornoobs.info, however I am not 100%
> sure I got the DNS records setup correctly either. Despite this, I
> should be able to send mail from the server. When I try to send an
> e-mail from the postfix admin interface, in the logs I get this:
>
> 2014-07-07T21:08:00.044266+03:00 Beliskner postfix/smtp[1690]: connect
> to gmail-smtp-in.l.google.com[74.125.136.26]:25: No route to host

That’s a normal network error. Are you sure you had connectivity at that
point? That your routing table was correct? The error says “no route”.

> 2014-07-07T21:08:00.044909+03:00 Beliskner postfix/smtp[1690]: connect
> to gmail-smtp-in.l.google.com[2a00:1450:4013:c01::1a]:25: Network is
> unreachable
> 2014-07-07T21:08:00.045390+03:00 Beliskner postfix/smtp[1690]: connect
> to alt1.gmail-smtp-in.l.google.com[2607:f8b0:400e:c03::1a]:25: Network
> is unreachable

When connection via IPv4 fails, then it goes to other addresses in the
list, which in this case they are IPv6, and if you don’t have IPv6, they
fail. Doesn’t mean anything, except confusing the logs :slight_smile:

> I was trying to send to my own gmail account. Now, if it was an
> encryption issue( I am using default smtp 25 and pop3 110 ports)

No, pop3 does not enter the picture at all here. Postfix is only smtp.
Pop/imap needs another daemon.

> I was
> expecting to see connection refused or something other than this. The
> computer is behind a router and the ports are forwarded properly.

You have a networking problem, before that point.

>
> Also, I created a mailbox in postfix admin, and I’d like to be able to
> connect to it using thunderbird.

Nay, impossible. As said, postfix does not do pop3/imap. You need to
setup something like dovecot for that.

Of course, you can tell Thunderbird to use your own smtp postfix server
for sending


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

On 2014-07-07 22:26, vaseer wrote:
>
> Quick question, can you tell by looking at the records if all is setup
> ok for receiving? Should I at least be able to receive when sending from
> my gmail to vasser@techfornoobs.info(the current postfix config).


cer@Telcontar:~> host techfornoobs.info
techfornoobs.info has address 178.156.145.46
techfornoobs.info mail is handled by 0 beliskner.techfornoobs.info.
cer@Telcontar:~>

That’s the host mail would be sent to, which translates to the same IP.
Seems correct.

> My DNS
> records are as follows:
>
> [67.222.132.198] returned a non-authoritative response in 250 ms:
>
>
> Answer records

When pasting computer commands and such, please use a CODE BLOCK, so
that the forum software doesn’t do silly things like converting URLS to
tiny urls, parenthesis into smileys, or otherwise hide or alter the
commands you entered. You get them by clicking on the ‘#’ button in the
forum editor. See photo


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

I am very greatful for your replyes. I managed to get mail going towards my gmail account by calling my ISP and having port 25 unblocked:D. Now I still need a way to get mail going towards me.Gmail says he mail could not be delivered, and I am not sure what I should do from here. My first bet would be that there is something wrong with the DNS records. But I’ll be ****ed if I can tell what. (not an expert on the matter either so…). I’ll start setting up a webmail imap or pop frontend and see how it goes.

Thank you for the help guys.

On 2014-07-08 22:06, vaseer wrote:
>
> I am very greatful for your replyes. I managed to get mail going towards
> my gmail account by calling my ISP and having port 25 unblocked:D. Now I
> still need a way to get mail going towards me.Gmail says he mail could
> not be delivered, and I am not sure what I should do from here.

Normally you should get a message with the reason, on the sending side.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)