How do I setup postfix to act as an email client, so when I send mail to it, it goes through another server?
Basically I want to make it so that if I use the mail command or otherwise send an email via the local mail server, it actually goes through an external mail server. Basically I need to be able to send email from a local computer but I don't want it to keep getting marked as spam because it's coming directly from the computer.
I currently don't have a mail server setup myself online but do have a shared host, so trying to route mail through there. I found a tutorial on how to do it and ended up with the following config in mail.conf: Code:
relayhost = [sharedhost]:465 Code:
[shardhost]:465 username:password However when I try to send an email I end up with an error in the log: Code:
(delivery temporarily suspended: lost connection with sharedhost[1.2.3.4] while receiving the initial server greeting) |
Hi,
any particular reason you are using postfix? exim4 is the default mta on Debian and can be easily configured to do this (send via a smarthost). Evo2. |
It's already setup so it's just easier and that's what I've always used so I'm at least a tad familiar with it. This is an old CentOS 6.10 box that's no longer being updated (the yum repos are dead) so trying to install something else would be more of a pain than it's worth.
Though if it's not easy to do, my plan B is to modify my application to use a separate client like mailx instead of connecting to the local server directly. From quick google search it looks like I can specify external mail server with that command. So rather than have my app send the mail directly to localhost via tcp socket I can just have it write to a file and then have a separate script that looks for files then uses mailx to send the mail. |
Quote:
Evo2. |
Yeah forgot to mention, I guess the config syntax, file locations etc does change a lot between distros.
|
All times are GMT -5. The time now is 04:38 PM. |