Solved

change the return path based on domain

Posted on 2011-09-06
3
708 Views
Last Modified: 2012-05-12
we are planning on moving a web site from one hosting company to another, both services being dedicated linux servers, but the new company's host is not accepting "-r" argument of sendmail.

one of our developers is normally using sendmail with -r option, which overrides the default Return-path an the following works on the old dedicated server
/usr/lib/sendmail –t –r web@[domain].com

Open in new window


how can we specify different return path when sending e-mails. there are two domains on our host and depending on the domain name we want the returns to be handed to web@ the respective domain.

on the new host however we get this
sendmail: illegal option -- r
sendmail: usage: sendmail [ -t ] [ -fsender ] [ -Fname ] [ -bp ] [ -bs ] [ arg ... ]

Open in new window

there are also various qmail processes running, which we did not have on the old server.
0
Comment
Question by:ee-gd
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 20

Accepted Solution

by:
Daniel McAllister earned 500 total points
ID: 36493526
Hehe... the reason the command line options aren't running is that the sendmail you're running on the "new" server is actually running QMail (and not sendmail -- which you unknowingly revealed in your question)...

The sendmail COMMAND works because its a dummy-front-end for QMail so that all of the programs in *nix-land don't have to be told how to interface to the mail program! [QMail is not unique in this... PostFix, exim, and most other *nix mail server packages do the same thing...]

I'm not sure what you're trying to set as a "return path" unless you're referring to the "reply-to" header field... and it's better to put that IN the header field yourself than to try to make the server insert it into your header... Then again, if you're trying to do something different, I may be off-base on that part of this reply... I'm not as familiar with semdnail as I once was, as I converted ALL of my systems to QMail more than 6 years ago...

I hope this helps

Dan
IT4SOHO

(PS: If you really like sendmail -- and know what you're doing with it -- simply uninstall the QMail on your new server & re-install the sendmail package... depending upon your distro, this shouldn't be too difficult now that you know that you're not even running sendmail to start with!)
0
 

Author Comment

by:ee-gd
ID: 36493928
thanks for the comprehensive comment.

what he wants is to send an e-mail from: customerservice@domain.com, but with Return-Path: web@domain.com - is this possible via qmail? or is our only choice installing sendmail?
0
 
LVL 20

Assisted Solution

by:Daniel McAllister
Daniel McAllister earned 500 total points
ID: 36498392
The "RETURN-PATH" field in the header is a standard header... so again, you can manually put it into your messages vs. having sendmail (or QMail) insert it from a command-line option.

As to how to emulate the -r option in QMail, that will depend on which version of QMail is installed (or more correctly worded: how it was installed)... The base QMail is a strange animal -- a freeware program that pre-dated the GPL, written by an author who tired of the project rather quickly -- but wrote it robustly and flexibly enough that it has lasted since 1995 with only very few changes or updates. I've used QMail Toaster (qmailtoaster.org) on my systems for about 6 or 7 years now.

I know in my version, you can replace the command line:
  /usr/lib/sendmail -r "user@fqdn" [other args]
with
  export RPLINE="user@fqdn" ; /usr/lib/sendmail [other args]

(Essentially, you set the value with an environment variable instead of a command line option).

I hope this helps!

Dan
IT4SOHO
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Pop culture is prime bait for hackers seeking to infect user’s computers and mobile devices with malicious malware. Hackers know exactly what the latest trends are online and know how to use them to their advantage.
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question