Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

change the return path based on domain

Posted on 2011-09-06
3
Medium Priority
?
715 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 21

Accepted Solution

by:
Daniel McAllister earned 2000 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 21

Assisted Solution

by:Daniel McAllister
Daniel McAllister earned 2000 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

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

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

The new Gmail Phishing Scam going around is surprising even the savviest of users with its sophisticated techniques.
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
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, f…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Suggested Courses

722 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