Postfix does not recieve emails on Fedora core 3 - mail server setup using IMAP

Hi newbie here!


I have followed these instructions at this website all the way through:

[url]http://nakedape.cc/info/Cyrus-IMAP-HOWTO/quickstart-fedora.html[/url]

and now I have the Evolution - Mail client able to send mail but not recieve mail.

As far as I know I am not recieving mail on the server at all?

I don't know how to check this and would like to know.

 
I have typed:

#mail in the terminal but I get no mail.

This is of course after I have sent mail to my server and I am logged in as

the appropriate user that is waiting for the mail.


I am trying to set up a mail server on Fedora core 3 using IMAP, Thunderbird and POSTFIX

I have previously got sendmail to work using the script at:

[url]http://cork.linux.ie/projects/install-sendmail/[/url]

I could send and recieve mail from the terminal but had no luck trying to

incorporate a mail client to handle the mail.

My end goal is to be able to store emails for different users on the server and

retrieve them using IMAP option within Thunderbird mail client from any

location and within my home network.

If anyone can help and shed any light on the situation then please do so it will be much

apprecitated.


>>>>>>>>>>>>>>>HELP        O B 1 KA:newbie:
emdevAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

uglyrockCommented:
Hi

I am not entirely clear on how your setup is running, so I will make an assumption and take it from there.

I assume that you have Postfix and Cyrus IMAP setup on the Server, configured as follows
IAMP for client (users0 to access their mail accounts
POSTFIX for the server to recieve and sendmail.

If this is correct then the follwoing should be of use

the first question. Is postfix working correctly. you can test this with the following

$>telnet localhost 25

You should get something like this back, (I amk using sendmail obviously)
Trying 127.0.0.1...
Connected to www.uglyrock.org (127.0.0.1).
Escape character is '^]'.
220 xserver.uglyrock.org ESMTP Sendmail 8.12.11/8.12.11; Sun, 3 Jul 2005 12:55:17 GMT

This is an SMTP command prompt, type in the following to send mail to the root user,

helo localuser.uglyrock.org
250 xserver.uglyrock.org Hello xserver.uglyrock.org [127.0.0.1], pleased to meet you
MAIL FROM:rick@uglyrock.org
250 2.1.0 rick@uglyrock.org... Sender ok
RCPT TO:root@locahost
250 2.1.5 root@locahost... Recipient ok
DATA
354 Enter mail, end with "." on a line by itself
Testing Testing
Hello this is a telnet test message
.
250 2.0.0 j63CwN17006005 Message accepted for delivery
quit

This will manually create root mail for you. Next login as root and check that the mail was delivered. If this works then you know that postfix is operating correctly.

 Next you need to check that the Cyrus IMAP service is working correctly and is available,  you can do this with
$> netstat -l | grep imap
You should get something like this back..
tcp        0      0 *:imap2                 *:*                     LISTEN

Now you just need to configure Thunderbird appropriately, which from the local machine would be
Recieveing Mail
Server = localhost
IMAP port = 143

Sending Mail
Server = localhost
port = 25

If this doesn't work, check you security settings, as you may be firewalling these services, a $> netstat -l by itsefl will show you all the listening services.

Finally you don't say whether this machine is to recieve mail from the outside world, but if it is then you will need either and SMTP forward to rouote mail to your server or a set of MX Mail eXchange records that point to your external IP  address

Hope this Helps
Uglyrock


emdevAuthor Commented:
Well the first problem is that postfix does not recieve emails. I have sent a test email to my yahoo account using postfix and that works fine.

I believe the configuration of postfix main.cf is incorrect.

My router and firewall are set up to work with sendmail so I know postfix should work because it uses the same ports, I assume.

when I telnet to my IP it says connection refused.

If I telnet localhost that works and I am connected.

uglyrockCommented:
OK So

If you are able to access the Postifx via Telnet on Port 25 from localhost, but not when trying to access via your External IP then for sure something is blocking the connection. Try using the nmap command to see if port 25 (SMTP) is opem on your external IP, like so

nmap <External IP>

For more info on nmap, use man nmap

e.g  $>namp 217.134.56.82

Hope this helps
Build an E-Commerce Site with Angular 5

Learn how to build an E-Commerce site with Angular 5, a JavaScript framework used by developers to build web, desktop, and mobile applications.

Gabriel OrozcoSolution ArchitectCommented:
enter this rule in your linux box and then try again telnet to port 25 from outside:

iptables -I INPUT -p tcp --dport 25 -j ACCEPT

emdevAuthor Commented:
Here is some more information:

I did nmap <external IP> and it didn't work it said host was down. But then I did what Redimido said and entered that iptables command.

I am now able to run #nmap <external IP>    but I cannot run telnet on the external IP it says connection refused. Is it possible I don't have telnet running?

I have just tried to send an email to my server and I did not recieve it using postfix.

Both inbound and outbound connections on port 25 smtp is allowed on my router firewall for my server. And on my server (Fedora core 3) firewall configuration I have

also allowed port 25 to be open.

Does any of this make any sense?

Gabriel OrozcoSolution ArchitectCommented:
post here the output of these two commands

iptables -L -vn
and
iptables -L -vn -t nat
emdevAuthor Commented:
# iptables -L -vn
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination
 1376 1227K RH-Firewall-1-INPUT  all  --  *      *       0.0.0.0/0            0.0.0.0/0

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination
    0     0 RH-Firewall-1-INPUT  all  --  *      *       0.0.0.0/0            0.0.0.0/0

Chain OUTPUT (policy ACCEPT 1362 packets, 1221K bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain RH-Firewall-1-INPUT (2 references)
 pkts bytes target     prot opt in     out     source               destination
 1184 1197K ACCEPT     all  --  lo     *       0.0.0.0/0            0.0.0.0/0
  192 30543 ACCEPT     all  --  eth0   *       0.0.0.0/0            0.0.0.0/0
    0     0 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0           icmp type 255
    0     0 ACCEPT     esp  --  *      *       0.0.0.0/0            0.0.0.0/0
    0     0 ACCEPT     ah   --  *      *       0.0.0.0/0            0.0.0.0/0
    0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            224.0.0.251         udp dpt:5353
    0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0           udp dpt:631
    0     0 ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:80
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:443
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:21
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:22
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:23
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:25
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:5901
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:110
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:137
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:138
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:139
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:53
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:143
    0     0 REJECT     all  --  *      *       0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited


# iptables -L -vn -t nat
Chain PREROUTING (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain POSTROUTING (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination
Gabriel OrozcoSolution ArchitectCommented:
well, it is not the firewall.

so please post here your posftix config
uglyrockCommented:
RE :
Both inbound and outbound connections on port 25 smtp is allowed on my router firewall for my server. And on my server (Fedora core 3) firewall configuration I have

also allowed port 25 to be open.

Does any of this make any sense?

Yes it does make sense, you do not need telnet running as a service to use it, as what you are actually doing is using telnet to provide a command line interface to the service, in this case, running on port 25 (SMTP). You could just as easily opened up a command line interface to Apache web server by doing telnet localhost:80.

Now you are able to connect to SMTP locally but not external. You do not however say whether you were sucessful in sending mail as I showed, ealier. Can you confirm that you were able to send an email ?

Here is the command sequence again, with responses and typos corrected

$>telnet localhost 25

You should get something like this back, (I amk using sendmail obviously)
Trying 127.0.0.1...
Connected to www.uglyrock.org (127.0.0.1).
Escape character is '^]'.
220 xserver.uglyrock.org ESMTP Sendmail 8.12.11/8.12.11; Sun, 3 Jul 2005 12:55:17 GMT



helo localuser.uglyrock.org
250 xserver.uglyrock.org Hello xserver.uglyrock.org [127.0.0.1], pleased to meet you
MAIL FROM:rick@uglyrock.org
250 2.1.0 rick@uglyrock.org... Sender ok
RCPT TO:root@localhost
250 2.1.5 root@localhost... Recipient ok
DATA
354 Enter mail, end with "." on a line by itself
Testing Testing
Hello this is a telnet test message
.
250 2.0.0 j63CwN17006005 Message accepted for delivery
quit

Now if this is succecsful locally and root actually gets the mail you sent, or the user who is aliased to root. Then you know that the mail server is functioning.

You could also check your /etc/hosts.allow and /etc/hosts.deny files.

Hope this helps
emdevAuthor Commented:
I would like to close this POST I have decided to use dovecot and thunderbird and IMAP and it all works perfectly


sorry for all your efforts I just got busy with other things.


please delete this thread!
Gabriel OrozcoSolution ArchitectCommented:
ask for it on community support.
here we are only people trying  to help =)
DarthModCommented:
PAQed with points refunded (500)

DarthMod
Community Support Moderator

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Networking

From novice to tech pro — start learning today.