Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need help setting up postfix to act as a mail client

Status
Not open for further replies.

TT2

IS-IT--Management
Oct 11, 2003
16
US
folks, Im hoping someone could help as this has been quite frustrating. I have postfix installed running suse 9.1 seems to be working well. When I try to sendmail everything gets stuck in queue. Im not sure if im even leaving the box its running on. This is a home pc running on a cable modem. On another pc running windows using outlook i can authenticate to my isp and I can send and receive mail. I would like to do the same thing with this pc running postfix. Just act as a client and authenticate to just SEND mail. I read alot of docs and did make changes to my main.cf for smtp but it still doesnt work. Anyone who has a ny insight as to how to configure postfix just to authenticate and act as a mail client to send mail only I would greatly appreciate it. Im really stumped and very frustrated. Thanks in advance for all replies.
 
The simplest answer is, you're doing it wrong. Since you don't give any of your config settings or error messages there's not really anything more specific anyone could tell you.

Are you using your ISP's SMTP relay as a smart host? They may block outoing SMTP. Do you have any error messages in your logs? If the messages are still in queue, then they are definitely still on your box. The queue display usually includes some sort of indication of why the mail failed delivery.
 
Eric,

thanks for the reply. regarding error messages, I do get time out errors when trying to send mail. The time outs seem to come from my ips server. ( I assume) I'm not sure if my isp blocks smtp or not. In the past using sendmail I had no problems but they could have changed that now. I have changed my configuration back to the basic install. I still get the same messages in queue saying they are timing out. What I want to be able to do is use my mail account that I have with my isp to be able to send mail but using postfix instead of say outlook. I think this can be done I just don't know how thats why I was looking to this forum for help. If you have any insight as to how to set this up from scratch I would appreciate it. Again thanks for your reply.
 
First off, you're way off base here as to what postfix actually does. As you're already aware, outlook is a mail client, or MUA (mail user agent.) It is used as an interface by a person to send and receve mail. Postfix, on the other hand, is a mail server, or MTA (mail transport agent) and is used to route mail between systems. You cannot use postfix as a mail client. Period.

However, you could use a local machine running postfix as a local mail server (which you could connect to with the MUA or your choice, say, Outlook, elm, pine, eudora, mailx, whatever.) The problem you're actually having is most likely because your ISP does not allow outbound (inbound either, for that matter) traffic on port 25. The reason for this is to prevent their networks (and others) from being overwhelemed by torrents of viruses and spam messages coming from infected or otherwise compromised machines.

There is a workaround to this issue. Your ISP's smtp server needs to be configured as a smarthost via the relayhost directive in main.cf. For example,

relayhost = [smtp.myisp.com]

For incoming mail, since inbound port 25 is likely blocked, use fetchmail or something like it to poll your ISP's POP3 server and deliver to local mailbox.

If this doesnt work, you will have to, as ericbrunson said, post a hell of alot more information before anyone can help you.
 
J thanks for the reply. I do know that postfix is a mail server maybe im just not posting my question properly. This pc I only want to be able to send mail as a specific user. It doesnt have to receive mail at all. I do not want to create a full mail server unless I have to. I was under the impression that postfix could authenticate to an existing mail server (like a client) to send/relay its mail similar to a null host or just send outgoing mail. I am on a cable modem with natted addressing on the inside. If this can't be done I understand that I will have to go the route of a full blown server with a FQDN which I do not have because im on my isp network. If there is another way to accomplish this I would appreciate all comments. Thanks agin for your reply.
 
In main.cf:

relayhost = isp.host.name
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd

sasl_passwd looks like this:
isp.host.name userid:password

Then run "postmap sasl_passwd"

Search the net for "postfix smtp authentication" for a how-to.
 
After changing main.cf, don't forget to
$ postfix reload
or
$ service postfix restart

 
Thanks guys for your help it seems to be working fine now after using sasl statements. I do have one other question, it seems that when i send mail as postfix from the user mailbox everything seems to work fine but if I send mail from the root mailbox mail doesnt go through. Do I need a alias for root or some type of masquerade so root can send mail? thanks again for all your help!

TT
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top