Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I followed a walkthrough which got me to this point.
Everything appears to be running - I can send mail to myself on my local machine using echo "hello"|mail myname. However, I cannot work out how to get postfix to pick up mail from outside. I have a gateway (running NAT) which is set to forward ports 25, 10025 and 10026 to my mailserver and I have pointed the MX record on my ISP's DNS to my fixed IP address. All seems ok so far? Do I need to open all those ports?
Additionally, I do not appear to be able to send mail.
My mailserver has a different name and domain to the address I have forwarded so I set that up in the mydestination field to reflect that. The e-mail address I am testing with is miker@wallgraveroad.co.uk (which I will allow to expire soon, so please feel free to try it if it helps). My goal is to have several domains pointed at the same server.
one thing I would do is figure out if it is postfix or dovecot, so send an e-mail to an e-mail address that isn;t on your domain, eg: hotmail.com, gmail.com, etc, etc if it comes in then your postfix is working okay.
Then try and send yourself an e-mail from squirrelmail to an e-mail on your domain if that comes though then you know both postfix and dovecot are working and it's probably something to do with your DNS settings.
have you setup your DNS servers in /etc/resolv.conf?
alright the best testing method for mail servers i've found is squirrelmail or some other kinda of web mail interface.
Already tried that - Sqm can read mail from the imap server but cannot send, outside or locally.
Quote:
Make sure apache is running
All ok - web is running on this machine anyway and Sqm works fine.
Quote:
one thing I would do is figure out if it is postfix or dovecot, so send an e-mail to an e-mail address that isn;t on your domain
No error - just vanishes into the void.
Quote:
Then try and send yourself an e-mail from squirrelmail to an e-mail on your domain if that comes though then you know both postfix and dovecot are working and it's probably something to do with your DNS settings.
Same result -into the void.
Quote:
Originally Posted by paul_mat
have you setup your DNS servers in /etc/resolv.conf?
All ok as far as I know:
Code:
search mydomainmyotherdomain
nameserver gateway IP address
humm ... thats strange, because even when I make mail servers just for testing without a real world IP and DNS address I can sendmail to real world mail servers.
Have you set your default MTA?
alternatives --config mta
and choose postfix, make sure sendmail isn;t there at all
rpm -qa | grep sendmail
rpm -e <whatever came out of the last command>
now make sure postfix is running
/etc/init.d/postfix status
restart it just to make sure
/etc/init.d/postfix restart
look in the mail logs for any errors or what is going on
/var/log/maillog
if you see something you thing it might be but can;t figure it out, post it up here
also turn on logging with dovecot
nano /etc/dovecot.conf
add the following line
log_path = /var/log/dovecot.log
now restart dovecot and once again, check the logs see if you can see anything
I followed a walkthrough which got me to this point.
Everything appears to be running - I can send mail to myself on my local machine using echo "hello"|mail myname. However, I cannot work out how to get postfix to pick up mail from outside. I have a gateway (running NAT) which is set to forward ports 25, 10025 and 10026 to my mailserver and I have pointed the MX record on my ISP's DNS to my fixed IP address. All seems ok so far? Do I need to open all those ports?
Yes, of course you need to open port 25. Don't know what you use 1025 or 10026 for?
Quote:
Additionally, I do not appear to be able to send mail.
You have set up your local SMTP server to deliver all outgoing mail through server relay.firstnet.net.uk. Is that what you want?
Anyway, check log files in /var/log/mail.info. You will find out exactly what happens to your e-mail.
Come back with a record from the log file to the forum if you can't figure it out yourself.
Right - I am slowly getting somewhere with this. I have started again with my main.cf (using the template that comes with postfix).
Now I can send locally via squirrel mail and it appears that I can send external mail too. However, it never arrives. The log entry is as follows:
Code:
Jun 9 13:03:57 duquesne postfix/smtp[19805]: BE4D9B3608: to=<michael@earlscourtvillage.co.uk>, relay=relay.firstnet.net.uk[212.103.224.41], delay=3, status=sent (250 ok 1149857627 qp 19171)
Jun 9 13:03:57 duquesne postfix/qmgr[19722]: BE4D9B3608: removed
Looks ok to me... The problem I found was that my smtp relay has a ".uk" on the end, which I missed out - silly mistake!
EDIT: I meant to ask - is there a way to pull e-mails out of an existing pop3 mailbox?
However, I still don't appear to be able to receive mail from the outside world and I am unclear as to where I should start looking. The MX record for wallgraveroad.co.uk is pointing to the correct address, beyond that I am lost!
I would think your source and destination should match.. If I do a reverse lookup of the duquesne address (my mail server is configured to do this automatically) I don't think it will resolve to your IP address, so if that failed my mail server would reject your message.. of course that's just a spam rejection issue..
myorigin = duquesne.anotherdomain.com
mydestination = wallgraveroad.co.uk
Here is the config from my working mail server... maybe you will see something that tweaks your brain for a solution..
in case you are womdering mynetworks 172.x.x.x is the DMZ the mail server sits in and 192.x.x.x is my internal network.. that's why there are 2 listed.. and no that's not the real domain name
but might I also suggest you check out the postfix users mail list ? Read the instructions on asking a question they want some specific information (postconf -n, REAL domain name and REAL IP addresses, etc.. otherwise they waste their time) they can usually spot the problem in one or two mail exchanges.. beside the developer there are some really bright people in there that are intimately familiar with postfix..
Fetchmail is a one-stop solution to the remote mail retrieval problem for Unix machines, quite useful to anyone with an intermittent or dynamic-IP connection to a remote mailserver, SLIP or PPP dialup, or leased line when SMTP isn't desired. Fetchmail can collect mail using any variant of POP or IMAP and forwards to a the local SMTP (via TCP socket) or LMTP (via TCP or Unix socket) listener or into an MDA program, enabling all the normal forwarding/filtering/aliasing mechanisms that would apply to local mail or mail arriving via a full-time TCP/IP connection.
Fetchmail is not a toy or a coder's learning exercise, but an industrial-strength tool capable of transparently handling every retrieval demand from those of a simple single-user ISP connection up to mail retrieval and rerouting for an entire client domain. Fetchmail is easy to configure, unobtrusive in operation, powerful, feature-rich, and well documented.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.