On my laptop, I use mutt with postfix for sending e-mails, and
fetchmail for receiving them. Postfix is setup to relay mails through
gmail. I am the only user on the computer and all mails originating
from the computer are sent from my account.

A limitation of the present setup is that it sends e-mail only from a
particular gmail account. I have, like most people these days, a
couple of different e-mail accounts that I like to use for different
purposes. I would like to set up mutt and postfix in such a way that I
could use these various accounts for sending mail. I have set up mutt
profiles for different accounts. With that mutt is able to send mails
with different "From:" headers.

But since all mails are passed on to postfix from my user account,
they are all treated as coming from vi...@localhostname. Postfix
ignores the From address put by mutt, and treats it only as coming
from vi...@localhostname. It then delivers the mail using only sasl
password authentication from one account which has been set up to
handle all general mail. The sasl password authentication file also
has details for other accounts but since postfix does not treat the
mail as coming from those account, it does not use the sasl password
authentication for them. In other words, since all mail is treated as
coming from vi...@localhostname, they go through the same sasl
password authentication, and therefore are sent as coming from the
same sender account.

I do not know if I have been able to make myself clear. I shall be
more than happy to clarify again if I have not been able to.

I am appending my /etc/postfix/main.cf

I shall be happy to provide (samples of) other configuration files, if
necessary.

I shall be grateful if anyone could point me to a useful guide on the issue.

Vikas


**********
#main.cf

# See /usr/share/postfix/main.cf.dist for a commented, more complete version
myhostname = shireen
#define('SMART_HOST','smtp.bol.net.in:172.16.0.23')
# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h


# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myorigin = /etc/mailname
mydestination = shireen, localhost.localdomain, localhost
relayhost = [smtp.gmail.com]
mynetworks = 127.0.0.0/8
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
mailbox_command = procmail -a "$EXTENSION"
inet_protocols = all
broken_sasl_auth_clients = yes

## TLS Settings
#
# For no logs set = 0
smtp_tls_loglevel = 1
#
# smtp_enforce_tls = yes
# Above is commented because doing it site by site below
smtp_tls_per_site = hash:/etc/postfix/tls_per_site
#
smtpd_tls_CAfile = /etc/postfix/cacert.pem
smtpd_tls_cert_file = /etc/postfix/FOO-cert.pem
smtpd_tls_key_file = /etc/postfix/FOO-key.pem
smtpd_tls_received_header = yes
smtpd_tls_session_cache_database = btree:/var/run/smtpd_tls_session_cache
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom

## SASL Settings
# This is going in to THIS server
smtpd_sasl_auth_enable = no
# We need this
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtpd_sasl_local_domain = $myhostname
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
smtpd_sasl_application_name = smtpd


## Gmail Relay

## Good for Testing
# sender_bcc_maps = hash:/etc/postfix/bcc_table

# Disable DNS Lookups
disable_dns_lookups = yes
#
# Great New feature Address Mapping
# for example may mchir...@localhost to mchir...@gmail.com
smtp_generic_maps = hash:/etc/postfix/generic
#
#
transport_maps = hash:/etc/postfix/transport

smtp_sender_dependent_authentication = yes
sender_dependent_relayhost_maps = hash:/etc/postfix/relayhost_map
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
relayhost = [smtp.gmail.com]:submission

virtual_alias_maps = hash:/etc/postfix/virtual


*****

_______________________________________________
ilugd mailinglist -- ilugd@lists.linux-delhi.org
http://frodo.hserus.net/mailman/listinfo/ilugd
Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi 
http://www.mail-archive.com/ilugd@lists.linux-delhi.org/

Reply via email to