LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-13-2018, 06:56 PM   #1
jsfry
LQ Newbie
 
Registered: Feb 2018
Posts: 2

Rep: Reputation: Disabled
Sendmail reply-to email always the same when in a virtualhosts environment


I am running an ubuntu 16.04 server (no cpanel) and have sendmail installed to use to send emails for cron and my many websites that I host. Problem is that I have one main domain name on this vps (digital ocean) when I set it up at first and then many virtual hosts under which I host other websites. When these virtual sites' contact forms send emails the reply-to email is always the email which sendmail is using for my main site and not the virtual site's email from which it is sent. Is there any way to tell sendmail to use a reply-to in accordance with the virtual domain the contact-form email has come from and not just always use the default email address? Each virtual host has its own free email & email address setup under its domain name hosting provider and hence coinciding mx record pointers at digital ocean pointing to that hosting provider.

Looking at sendmail documentation there seems to be some "features" that may help but I'm not sure which one - e.g. nocanonify, nullclient, or virtusertable or access_db.

If anyone could point me in the right direction it would be greatly appreciated.
 
Old 02-14-2018, 12:07 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,165
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Originally Posted by jsfry View Post
I am running an ubuntu 16.04 server (no cpanel) and have sendmail installed to use to send emails for cron and my many websites that I host. Problem is that I have one main domain name on this vps (digital ocean) when I set it up at first and then many virtual hosts under which I host other websites. When these virtual sites' contact forms send emails the reply-to email is always the email which sendmail is using for my main site and not the virtual site's email from which it is sent. Is there any way to tell sendmail to use a reply-to in accordance with the virtual domain the contact-form email has come from and not just always use the default email address? Each virtual host has its own free email & email address setup under its domain name hosting provider and hence coinciding mx record pointers at digital ocean pointing to that hosting provider.

Looking at sendmail documentation there seems to be some "features" that may help but I'm not sure which one - e.g. nocanonify, nullclient, or virtusertable or access_db.

If anyone could point me in the right direction it would be greatly appreciated.
You should use genericstable
 
Old 02-14-2018, 02:53 PM   #3
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,734

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Try using sendmail -r to specify the sender (see man sendmail)
 
Old 02-16-2018, 02:42 PM   #4
jsfry
LQ Newbie
 
Registered: Feb 2018
Posts: 2

Original Poster
Rep: Reputation: Disabled
thanks

@bathory - thanks a ton. That looks exactly like what I am looking for.

The second reply may also be an option if the above doesn't work.

Thanks for all the help.
You guys rock.
J
 
Old 02-16-2018, 03:19 PM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,165
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Originally Posted by jsfry View Post
@bathory - thanks a ton. That looks exactly like what I am looking for.

The second reply may also be an option if the above doesn't work.

Thanks for all the help.
You guys rock.
J
If you want to specify the sender from CLI, you should use the -f option.
Check this out
 
  


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
Reply to Email without revealing own address? LouRobytes General 2 05-27-2010 05:16 AM
0 reply email didn't get here baikonur LQ Suggestions & Feedback 6 08-15-2007 02:46 PM
Link in reply email Ephracis LQ Suggestions & Feedback 5 06-13-2005 06:23 PM
request reply (sendmail) sqn Linux - Networking 4 12-05-2003 05:12 PM
0 Reply Email? jeremy LQ Suggestions & Feedback 2 10-16-2003 01:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:28 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