[courier-users] Aliases for a virtual domain

2011-07-17 Thread Mark Constable
I thought I understood how this works but apparently not. I want all
mail to a virtually hosted domain to go to a single acount. I'm trying
out this...

~ grep -r qtmoz.org /etc/courier | sort
/etc/courier/aliases/system:@qtmoz.org: ad...@renta.net  ---
/etc/courier/esmtpacceptmailfor.dir/default:qtmoz.org
/etc/courier/hosteddomains/default:qtmoz.org
Binary file /etc/courier/aliases.dat matches
Binary file /etc/courier/esmtpacceptmailfor.dat matches
Binary file /etc/courier/hosteddomains.dat matches

but I'm still getting this error below...

Jul 17 16:40:10 smtp courieresmtp: id=0001815B.4E2283C4.6E91,
 from=x...@gmail.com,addr=ad...@renta.net-ma...@smtp.renta.net:
 configuration error: mail loops back to myself (MX problem).

I'm not sure where the loops back to myself comes from or the
ad...@renta.net-ma...@smtp.renta.net construction?


~ dig +short mx qtmoz.org.
0 smtp.renta.net.

~ hostname -f
smtp.renta.net

~ cat /etc/courier/me
smtp.renta.net

~ cat /etc/courier/locals
localhost


--
AppSumo Presents a FREE Video for the SourceForge Community by Eric 
Ries, the creator of the Lean Startup Methodology on Lean Startup 
Secrets Revealed. This video shows you how to validate your ideas, 
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
___
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users


Re: [courier-users] Aliases for a virtual domain

2011-07-17 Thread Sam Varshavchik

Mark Constable writes:


I thought I understood how this works but apparently not. I want all
mail to a virtually hosted domain to go to a single acount. I'm trying
out this...

~ grep -r qtmoz.org /etc/courier | sort
/etc/courier/aliases/system:@qtmoz.org: ad...@renta.net  ---
/etc/courier/esmtpacceptmailfor.dir/default:qtmoz.org
/etc/courier/hosteddomains/default:qtmoz.org
Binary file /etc/courier/aliases.dat matches
Binary file /etc/courier/esmtpacceptmailfor.dat matches
Binary file /etc/courier/hosteddomains.dat matches

but I'm still getting this error below...

Jul 17 16:40:10 smtp courieresmtp: id=0001815B.4E2283C4.6E91,
 from=x...@gmail.com,addr=ad...@renta.net-ma...@smtp.renta.net:
 configuration error: mail loops back to myself (MX problem).

I'm not sure where the loops back to myself comes from or the
ad...@renta.net-ma...@smtp.renta.net construction?


Virtual @domain addresses get written using 'me' for the domain. If you do  
not have 'me', the results of gethostname get used instead. That's where  
smtp.renta.net comes from.  From the makealiases page:


 The following special syntax implements a virtual domain. A virtual
 domain redirects all mail for an entire domain to one user:

 @domain: user

 This special entry results in any recipient address of the form
 foo@domain to be rewritten as user-foo@me, where me is the hostname of
 the machine, which we expect to be a local domain.

In your case user=ad...@renta.net, me=smtp.renta.net, domain=qtmoz.org, and  
foo=markc, so


user-foo@me

becomes

ad...@renta.net-ma...@smtp.renta.net



~ cat /etc/courier/me
smtp.renta.net

~ cat /etc/courier/locals
localhost




pgpg3SZLRbULW.pgp
Description: PGP signature
--
AppSumo Presents a FREE Video for the SourceForge Community by Eric 
Ries, the creator of the Lean Startup Methodology on Lean Startup 
Secrets Revealed. This video shows you how to validate your ideas, 
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev___
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users


Re: [courier-users] Aliases for a virtual domain

2011-07-17 Thread Mark Constable
On 2011-07-17 07:04 AM, Sam Varshavchik wrote:
  /etc/courier/aliases/system:@qtmoz.org: ad...@renta.net  ---
  ...
  I'm not sure where the loops back to myself comes from or the
  ad...@renta.net-ma...@smtp.renta.net construction?
 
 Virtual @domain addresses get written using 'me' for the domain. If
 you do not have 'me', the results of gethostname get used instead.
 That's where smtp.renta.net comes from.  From the makealiases page:

So to avoid the loops back to myself error I may need to put just
renta.net in /etc/courier/me rather than the FQDN of smtp.renta.net.

   The following special syntax implements a virtual domain. A virtual
   domain redirects all mail for an entire domain to one user:
   @domain: user
   This special entry results in any recipient address of the form
   foo@domain to be rewritten as user-foo@me, where me is the hostname
   of the machine, which we expect to be a local domain.
 
 In your case user=ad...@renta.net, me=smtp.renta.net,
 domain=qtmoz.org, and foo=markc, so
 
 user-foo@me  becomes  ad...@renta.net-ma...@smtp.renta.net

Okay I get most of that except the foo=markc bit. Where does this part
of courier pick up the markc part? Oh, from the LHS of the incoming
mail. So spam to various users @qtmoz.org will go to different 
destinations. Hmm, I'm definitely confused.

Perhaps I should simply ask how do I best redirect all incoming mail for
a virtual domain (qtmoz.org in this case) into a single local mailbox?


--
AppSumo Presents a FREE Video for the SourceForge Community by Eric 
Ries, the creator of the Lean Startup Methodology on Lean Startup 
Secrets Revealed. This video shows you how to validate your ideas, 
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
___
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users


Re: [courier-users] Aliases for a virtual domain

2011-07-17 Thread Sam Varshavchik

Mark Constable writes:


On 2011-07-17 07:04 AM, Sam Varshavchik wrote:
  /etc/courier/aliases/system:@qtmoz.org: ad...@renta.net  ---
  ...
  I'm not sure where the loops back to myself comes from or the
  ad...@renta.net-ma...@smtp.renta.net construction?

 Virtual @domain addresses get written using 'me' for the domain. If
 you do not have 'me', the results of gethostname get used instead.
 That's where smtp.renta.net comes from.  From the makealiases page:

So to avoid the loops back to myself error I may need to put just
renta.net in /etc/courier/me rather than the FQDN of smtp.renta.net.


Maybe.

To avoid confusion, the following rule of thumb applies:

Any domain with an A or an MX record that resolves to any IP address on a  
machine, should be listed either in locals, hosteddomains, or  
esmtpacceptmailfor, whatever the case may be. Alternatively, the domain may  
not be listed in any of these three, but then a list of aliases must be  
specified for each valid email address in that domain. A virtual domain  
alias meets this requirement. In your case that's @qtmoz.org


But then the second part of the rule of thumb is that one of the domains  
listed in locals or hosteddomains needs to be identified as the machine's  
primary domain, and either set as the hostname, or given in the me file.


This is the part that you're probably missing. You only have localhost  
listed in locals. Whatever you put in me, needs to be in locals or  
hosteddomains, too.


Additionally, the virtual domain alias should specify just the name of the  
local mailbox, admin.



Okay I get most of that except the foo=markc bit. Where does this part
of courier pick up the markc part? Oh, from the LHS of the incoming
mail. So spam to various users @qtmoz.org will go to different
destinations. Hmm, I'm definitely confused.

Perhaps I should simply ask how do I best redirect all incoming mail for
a virtual domain (qtmoz.org in this case) into a single local mailbox?


A virtual domain alias is the first step. The second step is to install  
a .courier-default in admin's account. What it all boils down to is that  
you're aliasing u...@qtmoz.org to the address admin-user.


Install a .courier-default in admin's home directory to put all mail for any  
user into the same mailbox.


That's what webadmin does, when that option is selected for a domain.


pgpelvU8ek4fB.pgp
Description: PGP signature
--
AppSumo Presents a FREE Video for the SourceForge Community by Eric 
Ries, the creator of the Lean Startup Methodology on Lean Startup 
Secrets Revealed. This video shows you how to validate your ideas, 
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev___
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users