Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

change the return path based on domain

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Are you an Exchange administrator employed with an organization? And, have you encountered a corrupt Exchange database due to which you are not able to open its EDB file. This article will explain all the steps to repair corrupt Exchange database.
Take a look at these 6 Outlook Email management tools which can augment the working and performance of Microsoft Outlook to give you a more rewarding emailing experience.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Suggested Courses

926 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