Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Postfix not receiving mail
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
craftyc
Guru
Guru


Joined: 23 May 2002
Posts: 443
Location: Behind You.

PostPosted: Tue Jul 16, 2002 3:02 pm    Post subject: Postfix not receiving mail Reply with quote

When I send mail to username@subdomain.mydomain.com via the email address my ISP gave me, it never gets delivered. I have gone through the Desktop Configuration guide to the word, have searched around but still no joy.

Could somebody please help me sort out this problem. Thank you.
_________________
Postcount ++
Back to top
View user's profile Send private message
delta407
Bodhisattva
Bodhisattva


Joined: 23 Apr 2002
Posts: 2876
Location: Chicago, IL

PostPosted: Tue Jul 16, 2002 3:06 pm    Post subject: Reply with quote

1. Is postfix running?
2. Can you connect to postfix? (telnet my.static.ip.address 25)
3. Is postfix set up as an MX for your target domain? (nslookup/dig your domain)
4. ...

More information, please.
_________________
I don't believe in witty sigs.
Back to top
View user's profile Send private message
craftyc
Guru
Guru


Joined: 23 May 2002
Posts: 443
Location: Behind You.

PostPosted: Tue Jul 16, 2002 3:40 pm    Post subject: Reply with quote

delta407 wrote:
1. Is postfix running?
2. Can you connect to postfix? (telnet my.static.ip.address 25)
3. Is postfix set up as an MX for your target domain? (nslookup/dig your domain)
4. ...

More information, please.


1) Yes, along with courier-imap (ssl). The Postfix docs said that it (or some other ones) is needed to recieve mail.
2) Confusingly, no. I have setup my firewall correctly to accept connections. The Shields-Up test shows the port as "Closed"
3) Huh... :?
4) Anything else?

PS This is the first time I'm setting up any kind of server, so go easy on me please.
_________________
Postcount ++
Back to top
View user's profile Send private message
abhishek
Retired Dev
Retired Dev


Joined: 28 Jun 2002
Posts: 393
Location: Los Angeles, CA

PostPosted: Tue Jul 16, 2002 4:07 pm    Post subject: Reply with quote

delta407 wrote:
1. Is postfix running?
2. Can you connect to postfix? (telnet my.static.ip.address 25)
3. Is postfix set up as an MX for your target domain? (nslookup/dig your domain)
4. ...

More information, please.

To number 3, i dont think it wouild have to be. If there is no MX record mail should just go the the comp u have.
Back to top
View user's profile Send private message
delta407
Bodhisattva
Bodhisattva


Joined: 23 Apr 2002
Posts: 2876
Location: Chicago, IL

PostPosted: Tue Jul 16, 2002 4:09 pm    Post subject: Reply with quote

First you have to make sure that your SMTP port is connectable from the outside. Then, you have to set up your DNS records for the target domain to forward mail to your server.

Basically, when a mail server receives mail for mydomain.com, it asks it's local friendly DNS server for routing information. This is stored in MX (Mail eXchange) records, which determine what mail server should accept mail for mydomain.com. You can get nslookup and/or dig by running "emerge bind-tools", and you can look up your MX records as follows:

Code:
$ nslookup
Note:  nslookup is deprecated and may be removed from future releases.
Consider using the `dig' or `host' programs instead.  Run nslookup with
the `-sil[ent]' option to prevent this message from appearing.
> set type=mx
> mydomain.com
Server:         my.local.dns.server
Address:        my.local.dns.server#53

mydomain.com    mail exchanger = 1800 m1.dnsix.com.
mydomain.com    mail exchanger = 1800 m.dnsix.com.


Or:
Code:
$ dig mydomain.com mx

; <<>> DiG 9.1.3 <<>> mydomain.com mx
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 14123
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 4, ADDITIONAL: 6

;; QUESTION SECTION:
;mydomain.com.                  IN      MX

;; ANSWER SECTION:
mydomain.com.           86308   IN      MX      1800 m.dnsix.com.
mydomain.com.           86308   IN      MX      1800 m1.dnsix.com.

... more stuff ...


my.fully.qualified.domain.name should be listed as an MX for mydomain.com.
_________________
I don't believe in witty sigs.
Back to top
View user's profile Send private message
craftyc
Guru
Guru


Joined: 23 May 2002
Posts: 443
Location: Behind You.

PostPosted: Tue Jul 16, 2002 5:18 pm    Post subject: Reply with quote

I should also have mentioned that if I send an email to username@my.fully.qualified.domain.name from root@my.fully.qualified.domain.name, I receive the e-mail.

Here is the output of dig.

Code:
chandegra root # dig chandegra.homelinux.com mx

; <<>> DiG 9.2.1 <<>> chandegra.homelinux.com mx
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 62384
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;chandegra.homelinux.com.       IN      MX

;; AUTHORITY SECTION:
homelinux.com.          1800    IN      SOA     ns1.dyndns.org. hostmaster.dyndns.org. 2001580359 10800 1800 604800 1800

_________________
Postcount ++
Back to top
View user's profile Send private message
delta407
Bodhisattva
Bodhisattva


Joined: 23 Apr 2002
Posts: 2876
Location: Chicago, IL

PostPosted: Tue Jul 16, 2002 6:25 pm    Post subject: Reply with quote

craftyc wrote:
I should also have mentioned that if I send an email to username@my.fully.qualified.domain.name from root@my.fully.qualified.domain.name, I receive the e-mail.

Okay, that means postfix is routing locally without problems.

craftyc wrote:
Code:
chandegra root # dig chandegra.homelinux.com mx

; <<>> DiG 9.2.1 <<>> chandegra.homelinux.com mx
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 62384
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;chandegra.homelinux.com.       IN      MX

;; AUTHORITY SECTION:
homelinux.com.          1800    IN      SOA     ns1.dyndns.org. hostmaster.dyndns.org. 2001580359 10800 1800 604800 1800

Well, if your mail server resides at chandegra.homelinux.com, then everything should be okay, as long as inbound connections are forwarded properly.
_________________
I don't believe in witty sigs.
Back to top
View user's profile Send private message
craftyc
Guru
Guru


Joined: 23 May 2002
Posts: 443
Location: Behind You.

PostPosted: Tue Jul 16, 2002 6:39 pm    Post subject: Reply with quote

delta407 wrote:

Well, if your mail server resides at chandegra.homelinux.com, then everything should be okay, as long as inbound connections are forwarded properly.


How do I do that??? :oops:

I have set my (Linksys BEFSR41) router to forward the necessary ports to the right place. Is there anything else that needs to be done?

Thanks.
_________________
Postcount ++
Back to top
View user's profile Send private message
delta407
Bodhisattva
Bodhisattva


Joined: 23 Apr 2002
Posts: 2876
Location: Chicago, IL

PostPosted: Tue Jul 16, 2002 6:43 pm    Post subject: Reply with quote

craftyc wrote:
I have set my (Linksys BEFSR41) router to forward the necessary ports to the right place.


Well, if port 25 is forwarded inbound then you should be good. I would make sure your hostname is a FQDN (fully-qualified domain name; i.e. ping will resolve to your external IP), since that's a Good Thing™ for mail servers to do.

Additionally, I would make sure postfix is accepting SMTP connections at all (telnet localhost 25), and then that postfix is accepting SMTP connections from the outside world (uhh... check the man pages).
_________________
I don't believe in witty sigs.
Back to top
View user's profile Send private message
aardvark
Guru
Guru


Joined: 30 Jun 2002
Posts: 576

PostPosted: Tue Jul 16, 2002 8:10 pm    Post subject: Reply with quote

But if your isp does not forward port 25 as in my case (spam reduction) , what do you do then? Ask them to make an mx record for your mailserver?

In my case, which look equal the the one of the topicstarter, it is impossible to get mail delivered to my server from outside the domain of the isp... or at least I think so. DO I understand correctly that the ISP has to make an mx record on their dns?
Back to top
View user's profile Send private message
delta407
Bodhisattva
Bodhisattva


Joined: 23 Apr 2002
Posts: 2876
Location: Chicago, IL

PostPosted: Tue Jul 16, 2002 10:00 pm    Post subject: Reply with quote

aardvark wrote:
But if your isp does not forward port 25 as in my case (spam reduction) , what do you do then?


Then you're pretty much screwed. If your ISP is blocking port 25 to all its clients, no DNS magic will help you. Really, you have three options: one, use someone else to be your e-mail server; two, have a computer on another network accept mail for you and route it to your IP on a different port; three, switch ISPs.

SMTP expects the remote server to be on port 25; if you can't get port 25, you can't get inbound mail directly.
_________________
I don't believe in witty sigs.
Back to top
View user's profile Send private message
MoonWalker
Guru
Guru


Joined: 04 Jul 2002
Posts: 510

PostPosted: Wed Jul 17, 2002 3:41 am    Post subject: Reply with quote

Hi!

Can I jump in here and take part of your expertice delta? I'm setting up postfix as well right and have a slightly different problem and have searched postfix mail achive for hours without finding a solution. I have it up working ok except for one detail. I have several domains setup using virtual_maps as an example:

posthost.biz virtual
joakim@posthost.biz joakim
kamila@posthost.biz kamila

$myhostname = ns1.astrocalc.net
$mydomain = astrocalc.net

.... etc.

Problem is when I from a webmail account send a mail to kamila@posthost.biz

it shows up in mail log as kamila@astrocalc.net and joakim@posthost.biz even comes through prepended with an other of my local usernames netjosch@astrocalc.net

I wonder if this possibly can have to do the way I have set up MX for the virtual or alias domains? Here's a dig...

Code:
root@ns1 joakim # dig posthost.biz mx

; <<>> DiG 9.2.1 <<>> posthost.biz mx
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 58275
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2

;; QUESTION SECTION:
;posthost.biz.                  IN      MX

;; ANSWER SECTION:
posthost.biz.           38400   IN      MX      10 cms.posthost.biz.

;; AUTHORITY SECTION:
posthost.biz.           38400   IN      NS      ns2.astrocalc.net.
posthost.biz.           38400   IN      NS      ns1.astrocalc.net.

;; ADDITIONAL SECTION:
cms.posthost.biz.       38400   IN      A       212.3.10.152
ns1.astrocalc.net.      38400   IN      A       212.3.10.145

;; Query time: 5 msec
;; SERVER: 212.3.10.145#53(212.3.10.145)
;; WHEN: Wed Jul 17 04:40:59 2002
;; MSG SIZE  rcvd: 131


should I be better to use the astrocalc.net MX?

crafty, if you don't find as local solution for your mx dilema I can host you an MX for a while (if that is possible, I geuss so as I run my own dns :-) not being force to rush for a working solution. Only condition - no spam sending.

/Joakim
/
_________________
/Joakim

Living on earth is expensive, but it includes a free trip around the sun
every year.
Back to top
View user's profile Send private message
delta407
Bodhisattva
Bodhisattva


Joined: 23 Apr 2002
Posts: 2876
Location: Chicago, IL

PostPosted: Wed Jul 17, 2002 3:48 am    Post subject: Reply with quote

It sounds like Postfix is receiving the mail, so your MX configuration is fine. AFAIK no MTA gets confused if the return on an MX record is not the same as theh hostname the remote MTA gives out. So, as long as that MX in turn resolves to your IP, you should be good.
_________________
I don't believe in witty sigs.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
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
You cannot vote in polls in this forum