Re: destination smtp
Charles Cazabon <[email protected]>
| Newsgroups | gmane.mail.getmail.user |
|---|---|
| Message-ID | <[email protected]> |
Jan Hendrik Berlin <[email protected]> wrote: > > well I'm looking for an option to deliver mails to a smtp server which is > running on another system. I think there is no module to do this. As I'm a > programmer, I think about writing such a module. There's no built-in destination class to forward messages via SMTP to another MTA, because that's an *extremely* bad idea. If you don't do it exactly right, you will cause mail loops, bounce messages delivered to someone who didn't actually author the message, lost messages, delivered-multiple-times messages, corrupted messages, and/or other problems. You would be much, much better off to just run getmail on that other machine (the one you want to forward to by SMTP). Why do you want to attempt this? If you do try to implement delegating delivery to another MTA by SMTP, you do not need to write any code. Think of something like using ssmtp or another command-line SMTP program from getmail's MDA_external class. If you do this, ensure ***you always configure the SMTP program to forcibly set the enveloper sender address (the envelope return-path address) to an address in your domain that you control ***. This may require writing a wrapper script around your SMTP program. Again, it is much easier and less dangerous to simply run getmail on the machine where you actually want the mail to be sent. > 2. Do you see any problems to use this method? I strongly suspect that because you're asking this question, you do not actually know enough about SMTP email to implement this forwarding safely. Please do not do this. Charles -- ----------------------------------------------------------------------- Charles Cazabon GPL'ed software available at: http://pyropus.ca/software/ -----------------------------------------------------------------------