Solved

change the return path based on domain

Posted on 2011-09-06
3
711 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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Article by: Dermot
The life of crime is over for 22 year-old Christian Ian Salvador, a student from Isabela State University in the Philippines.
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses

617 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