Question

Need to treat some email-ids of the same domain as external/remote users.

Asked by: agnesfernandes

Hi All,

I have installed qmail using qmailrocks and it really rocks!

I have a setup where there is one catchall account and there are other accounts on the same domain. I have installed vpopmail.

So emails sent to local1@abc.com, local2@abc.com are collected by the catchall account. The email server setup has to pull down emails from the catchall account and distribute them.

There are other users on the same domain who are not in the same office. These are located in different cities. eg. city1@abc.com, city2@abc.com.

I want the mail server to treat city1@abc.com, city2@abc.com as remote users.

Previously I used to put the local users in /var/qmail/control/virtualdomains. But this does not seem to work with vpopmail.

How do i do this?

Thanks

This question is in progress. Our experts are working on an answer right now.
Sign up for immediate access to the solution once it becomes available.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-06-26 at 07:24:45ID24525212
Tags

Qmail

,

vpopmail

Topics

Qmail Email Server

,

Linux

,

Email Servers

Participating Experts
3
Points
500
Comments
9

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. How to configure auto responder in Qmail
    HI , 1) I have mail user named user1@test.com, 2) all incoming Mail to the user should respond with auto reply. 3) Auto reply should not happen to support@xyz.com How can i do this .
  2. Force QMAIL to send mail in QUEUE
    How can i force QMAIL to send all the old messages out in the queue?
  3. Whats the meaning of "550 Message does not pass Do…
    Hello, When I send mail to certain domains, i receive this message: " POP3.bcn.domainxxx.com[192.168.1.4] said: 550 Message does not pass DomainKeys requirements for domain yyy.com (in reply to end of DATA command) whats the meaning of this message?, and...
  4. iftop -CFLAG error
    I was trying to install iftop on linux server RHEL 5.4, I get this error........ checking POSIX threads usability... configure: error: it fails. We probably guessed the wrong CFLAGS.
  5. Understanding Qmail Delivery Errors in Maillog file
    I have the following errors in my Qmail maillog file, and I've can't seem to find the cause. These are generate when I send a mail through Mailman to a Listserve which is fed by a MySQL database. Everything works properly with another mailing list so I know the configuratio...
  6. Qmail - unable to receive mail
    Currently I have my mail setup on my Windows server, and I'm trying to switch to linux. So I know my MX records are setup correctly since I'm currently able to receive mail just fine. On my router I changed port from my windows box to the linux box (assuming this is what d...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: arnoldPosted on 2009-06-27 at 09:53:12ID: 24728440

How do the users in the remote offices access their emails?

Unless you configure qmail to handle email for user1@somedomain.com different than user2@somedomain.com, the catch-all.
Are the remote users have their own email address to which the email could be forwarded?
user1@somedomain.com has an email address of name.last@someotherdomain.com.

You could then setup forwarding directions for emails sent to user1@somedomain.com to be rerouted to name.last@someotherdomain.com.

Depending on what the "email server" that retrieves the catch-all can do and whether the same email server exist in the other offices?
I.e. is there a tie in among the multiple location such that an email to user1@somedomain.com at the main office to push that email to user1@alternateoffice.somedomain.com.

The setup though is puzzling, whereby you are collecting all emails and then having a different server redistribute the email based on header entries.

 

by: MysidiaPosted on 2009-06-27 at 12:48:24ID: 24728999

It's generally not possible to properly distribute mail based on mail header entries.
Sometimes the recipient's address won't be in mail headers.

It may be multi-drop at the other end, but you should want it to be multiple mailboxes at your end.

Unless your upstream mail server is scripted to specifically add a special message header based on the actual recipient address list that was submitted with MAIL FROM  (which could be intended for MULTIPLE local recipients, e.g. the message could be intended for two of the users of the domain),  this may not be a tractible problem.


This is especially true of Bcc'd mail, commonly utilized for mailing list traffic.

FETCHMAIL has a multidrop mode that may help you "pull" mail like this, from the fetchmail man page  (install fetchmail and type 'man fetchmail'):

*With multidrop-mode, fetchmail is not able to assume that there is only
 a  single  recipient,  but rather that the mail server account actually
 contains mail intended for any number of different recipients.

*Therefore,  fetchmail must attempt to deduce the proper "envelope recipient"
 from the mail headers of each message.   In  this  mode  of  operation,
 fetchmail almost resembles an MTA, however it is important to note that

* neither the POP nor IMAP protocols were intended for use in this  fashion,  and  hence  envelope information is often not directly available. Instead, fetchmail must resort to a process of informed  guess-work  in an attempt to discover the true envelope recipient of a message, unless the ISP stores the envelope information in some header  (not  all  do).

* Even  if this information is present in the headers, the process can be error-prone and is dependent upon the specific  mail  server  used  for mail  retrieval.

* Multidrop-mode is used when more than one local user is specified for a particular server account in the configuration file.  Note  that  the  forgoing discussion of singledrop- and multidrop-modes does not apply to the ESMTP ETRN or ODMR retrieval methods, since  they are  based upon the SMTP protocol which specifically provides the envelope recipient to fetchmail.

 

by: agnesfernandesPosted on 2009-06-28 at 11:21:01ID: 24731942

I am sorry, I think I did not add enough information in the question.

The remote users city1@abc.com, city2@abc.com are not a part of the catch-all account. So the catch-all account does not download emails for the users city1@abc.com, city2@abc.com.

The challenge is that when local1@abc.com sends an email to 2 users local2@abc.com and city1@abc.com then the email server should deliver the email to local2@abc.com locally and city1@abc.com should be treated as a REMOTE user.

thanks
agnes

 

by: arnoldPosted on 2009-06-28 at 12:43:02ID: 24732179

You need to configure the email server that retrieves the catch-all email to use the Delivered-To: line versus reprocessing the emails based on the To: or Cc: fields.

Without know which server you have that pulls the catch-all it is impossible to say whether this is even an option.

 

by: MysidiaPosted on 2009-06-28 at 13:16:04ID: 24732285

virtualdomains  is primarily for scenarios like mapping an entire domain to be beneath a user on the system.  /var/qmail/users/assign   is what you could edit/look at to override handling manually per domain or user;  as a user of vpopmail, I don't recommend you actually edit and add a user entry this file,  because this file is normally auto-generated,  and re-generated every time you change a mailbox and vpopmail has special needs (also, the program  /var/qmail/bin/qmail-newu   needs to get  run every time the assign file changes).

Take a look at the contents of the file, it will normally contain something like:
+example.com-:example.com:399:399:/usr/local/var/vpopmail/domains/example.com:-::

The vpopmail path is very important, it indicates where you can make .qmail files for the domain.

What I believe you want to do is  (in this example)  edit  /usr/local/var/vpopmail/domains/example.com/.qmail-city1
and Place in the file, something like this:
|qmail-remote '[put.theremote.mailserver.ip.here]' "$SENDER" "$EXT@$HOST"

e.g.
|qmail-remote '[10.180.0.56]' "$SENDER" "$EXT@$HOST"

Of course, the IP address needs to be the specific remote mailserver to carry the message to.     Be very careful about this,  qmail will not generally protect you against creating a mail loop  when forcing the system to use a remote mailserver for a local user,  /var/qmail/control/smtproutes  has the same risks.

#######

Or If you placed an entry ahead of that in the assign file, you could override the handling for that user.   The problem is this file is generally automatically generated.

To manipulate the assign file (when NOT using vpopmail), I with my hacked POP3 proxy+manually hacked popper for vdomain support normally do things like this, edit /var/qmail/users/append and..
#Temporary stop mail flow
chmod +t /var/qmail/control
cat /var/qmail/users/mailinglists > /var/qmail/users/assign
/var/qmail/bin/qmail-pw2u < /etc/passwd >> /var/qmail/users/assign
/var/qmail/bin/qmail-newu
#Turn mail back on
chmod -t /var/qmail/control

Because you use vpopmail, you will very possibly need to utilize tools that came with vpopmail instead of qmail to handle any changes you want to make to the 'users' file.

When vpopmail is used for virtualdomain support
Normally one would find the directory for the domain in

/var/vpopmail/domains/domainname.com
and create  mailboxes for the city1 and city2 users
or a  set of files
.qmail-city1
.qmail-city2

with the forwarding address

Or make a mailbox

vadduser username@domain.com




















 

by: it4sohoPosted on 2009-06-30 at 09:41:15ID: 24747073

One of the wonders of the Internet is that it doesn't matter where the server is -- my "backup" mail server is in Vancouver, even though my main mail server is in Tampa, FL.

That being said, I'm somewhat confused by your question -- but what I THINK you're asking is whether different users in the same domain can fetch their mail from different servers.

If that is your question, then the answer is yes -- but with a caveat.

Before I go much further, I would ask that you confirm that you're trying to accomplish this...  and if you ARE in fact trying to accomplish this, I might ask why? As in, why not just access all of ABC.COM's e-mails from one server (I host nearly a hundred domains from my server in Tampa -- and except for webmail, ALL of them access their mail via SMTPS and IMAPS connections (that is SMTP and IMAP over SSL). Some of those clients are in the Tampa Bay area, some are not (some are in NC, some in SC, one in GA, one in AZ, and one is even in China!)

So before I write a long set of instructions on how to setup qmail to forward messages for individual users to another server that will accept the messages for just those users, please confirm that this is what you're hoping to accomplish.

Thanks,

Dan
IT4SOHO

 

by: agnesfernandesPosted on 2009-07-21 at 07:03:36ID: 24904629

Hi all,

Thanks for all your inputs.

I finally managed to resolve this problem using this.

I hit upon this article
http://qmail.jms1.net/multi-location.shtml

create the 2 files in  ~vpopmail/domains/mycompany.com directory:

Filename      Contents
.qmail-alex      |qmail-remote '[10.2.2.2]' "$SENDER" "$EXT@$HOST"
.qmail-alex-default      (Symbolic link to .qmail-alex)

This is what Guru Mysidia gave as a solution.

Is there any better solution than this, because this involves 2 steps :
1. creating a user account for an EXTERNAL user
2. adding these lines in the dotqmail [.qmail] file of these users.

thanks
agnes

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...