Solved

change the return path based on domain

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

Accepted Solution

by:
Daniel McAllister earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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 Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

It’s a strangely common occurrence that when you send someone their login details for a system, they can’t get in. This article will help you understand why it happens, and what you can do about it.
Marketers need statistics and metrics like everybody else needs oxygen. In this article we explain how to enable marketing campaign statistics for Microsoft Exchange mail.
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

728 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now