LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 06-27-2021, 11:10 PM   #1
anctop
Member
 
Registered: Feb 2010
Posts: 99

Rep: Reputation: Disabled
e-mail forwarding via smtp relay


Hi,

Our system is using "Sendmail" as MTA & "procmail" as LDA.
Per user e-mail auto-forwarding is implemented with the "~/.forward" mechanism.

I'd like to ask how to configure forwarding to use an external SMTP relay instead of the default local "sendmail" executable.

Thanks in advance.
 
Old 06-29-2021, 08:13 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,635

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by anctop View Post
Hi,
Our system is using "Sendmail" as MTA & "procmail" as LDA. Per user e-mail auto-forwarding is implemented with the "~/.forward" mechanism. I'd like to ask how to configure forwarding to use an external SMTP relay instead of the default local "sendmail" executable.
You enable a relay host in the sendmail config file. One of the first hits in Google for "linux sendmail relay host"
https://www.snel.com/support/smtp-relay-with-sendmail/
 
Old 06-29-2021, 09:33 PM   #3
anctop
Member
 
Registered: Feb 2010
Posts: 99

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TB0ne View Post
You enable a relay host in the sendmail config file. One of the first hits in Google for "linux sendmail relay host"
https://www.snel.com/support/smtp-relay-with-sendmail/
Thanks for the suggestion.

I should apologize for not having my question stated accurately.

The approach is good for relaying all e-mails to an external SMTP host, but I am looking for a solution for per user forwarding, i.e. some users forward with local "sendmail" and some via SMTP.

It is heard that e-mail auto-forwarding can also be achieved via "~/.procmailrc". However, I am not familiar with "procmail" configuration.
Would it be possible to solve my problem by devising some tweak in "~/.procmailrc" ?
 
Old 06-30-2021, 05:24 AM   #4
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Maybe msmtp would suit.
 
1 members found this post helpful.
Old 06-30-2021, 08:04 AM   #5
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,635

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by descendant_command View Post
Maybe msmtp would suit.
+1 for this, given the updated information from the OP.
 
Old 07-01-2021, 01:30 AM   #6
anctop
Member
 
Registered: Feb 2010
Posts: 99

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TB0ne View Post
+1 for this, given the updated information from the OP.
Thanks for the suggestion. I'll try it.
 
Old 07-01-2021, 02:55 AM   #7
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Another general +1 for msmtp from me.
Have also posted about it on my personal blog.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SMTP newbie queries: #< #5.3.5 SMTP; 553 5.3.5 system config error> #SMTP# LYC Linux - Newbie 0 12-04-2014 12:45 AM
Mail Forwarding in postfix/maildrop/redhat (like yahoo mail forwarding) topcat Linux - Software 1 08-31-2007 12:10 PM
SMTP "open relay" and SMTP AUTH aikempshall Linux - Security 3 10-11-2006 08:19 AM
relay mail to sendmail relay server??? lemay_jeff Linux - Newbie 0 07-06-2004 04:54 PM
Mail forwarding via smtp w/rules Greg21 Linux - Software 1 04-29-2004 02:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration