You are not logged in.

#1 2011-12-04 13:51:43

looren
Member
From: Sweden
Registered: 2009-11-05
Posts: 30

Sending mail & domain name

Hi all

I am having problems sending mail to some email providers from my server, and I would guess the problem is that domain is not set correctly. When I look at the detailed information on received mail it says Received: from jupiter.localdomain.
'jupiter.localdomain' also shows up on 'Message-ID:' and 'Return-Path:'
If this might be the reason to why emails are having problems getting through, where can I change the 'localdomain' to my domain? I have searched in /etc but I cant find 'localdomain' text anywhere.

Greatful for help
//L

Offline

#2 2011-12-04 15:12:09

teekay
Member
Registered: 2011-10-26
Posts: 271

Re: Sending mail & domain name

You can either set your full qualified domain name in /etc/hosts for localhost, or configure your MTA correctly. Which one are you using?

Offline

#3 2011-12-04 15:24:07

looren
Member
From: Sweden
Registered: 2009-11-05
Posts: 30

Re: Sending mail & domain name

I am not familiar at all with MTA. Never used it.

In my hosts file I have:
127.0.0.1       jupiter.domain.se      localhost
192.168.3.20    jupiter.domain.se      jupiter
(not really domain.se, but for privacy reason I wrote that instead)
192.168.3.20 is only used internally against another server, but I have no clue if this affects the mail in any way.

In rc.conf I have:
HOSTNAME="jupiter"
If I understood install correctly HOSTNAME needs to match what I have in hosts file.

See anything wrong with this?

Offline

#4 2011-12-04 20:46:35

teekay
Member
Registered: 2011-10-26
Posts: 271

Re: Sending mail & domain name

Okay, looks good. MTA is the mail transfer agent, maybe you have postfix?
If it's postfix, then edit /etc/postfix/main.cf
The most interesting lines are:

myhostname = jupiter.domain.se
mydomain = domain.se
myorigin = $mydomain

Perhaps this should be enough to send mail into the public (my ISP for example requires relaying through their mail gateway, that needs more config)

Offline

#5 2011-12-04 21:11:17

looren
Member
From: Sweden
Registered: 2009-11-05
Posts: 30

Re: Sending mail & domain name

Yes, that is right, I use postfix
I changed what you said and now I get Message-ID: in detailed information about email with right domain but both “Received: from”  and “Return-Path:” has jupiter.localdomain still. Any clue what to do to get those right to?

Offline

#6 2011-12-05 17:14:44

teekay
Member
Registered: 2011-10-26
Posts: 271

Re: Sending mail & domain name

You could try doing an address rewrite with smtp_generic_maps. It's explained here: http://www.postfix.org/ADDRESS_REWRITIN … ml#generic

Offline

#7 2011-12-05 18:33:40

looren
Member
From: Sweden
Registered: 2009-11-05
Posts: 30

Re: Sending mail & domain name

Okay, I will have a look at that

Thank you for your help teekay!

Offline

Board footer

Powered by FluxBB