LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   How would i configure/set up postfix to send email from my local pc ? (https://www.linuxquestions.org/questions/linux-server-73/how-would-i-configure-set-up-postfix-to-send-email-from-my-local-pc-911969/)

cola 11-06-2011 06:03 AM

Quote:

Originally Posted by catkin (Post 4517125)
As above, the from address I have used is root.<server name>@<valid public email domain name>. If you do not have a <valid public email domain name> to use, you could use something like cola@gmail.com and put any user and server name information in the subject.

/etc/postfix/sasl_passwd includes the logon name for the SMTP server logon; for the Gmail SMTP server it would be something like cola@gmail.com

I have set /etc/postfix/sasl_passwd and I can send email using 'cola@gmail.com' . From /var/log/mail.log i see the 'from' address is 'user@mail.mydomain.com' but as it's assigned 'cola@gmail.com' in /etc/postfix/sasl_passwd and the relayhost = [smtp.gmail.com]:587 so if i login with the 'to' email address i see the 'from' address is 'cola@gmail.com' .

But i'm trying to send email from my local pc useraccount that means, from 'user@mail.mydomain.com' .

How can i set a public email domain ?

How can i check if i have a public mail domain or not ?

How can i add MX record ?

How can i add reverse dns ?

Code:

cat /etc/hostname = mail.mydomain.com
cat /etc/hosts = 127.0.1.1  mail.mydomain.com


catkin 11-06-2011 06:14 AM

Quote:

Originally Posted by cola (Post 4517138)
I have set /etc/postfix/sasl_passwd and I can send email using 'cola@gmail.com' . From /var/log/mail.log i see the 'from' address is 'user@mail.mydomain.com' but as it's assigned 'cola@gmail.com' in /etc/postfix/sasl_passwd and the relayhost = [smtp.gmail.com]:587 so if i login with the 'to' email address i see the 'from' address is 'cola@gmail.com' .

Progress :)

/etc/postfix/sasl_passwd is only used for logging on to the SMTP server; it has nothing to do with the from address (unless the SMTP server is configured to force the from address to the logon address).

Quote:

Originally Posted by cola (Post 4517138)
But i'm trying to send email from my local pc useraccount that means, from 'user@mail.mydomain.com'

Most (all?) SMTP servers will not deliver such mail unless mail.mydomain.com is a DNS-resolvable domain name.

Quote:

Originally Posted by cola (Post 4517138)
How can i set a public email domain ?

Using /etc/aliases to alias local user "user" to an email address with a public domain and then running postfix's newaliases command to process /etc/aliases.

Quote:

Originally Posted by cola (Post 4517138)
How can i check if i have a public mail domain or not ?

It will be displayed in /var/log/mail.log.

Quote:

Originally Posted by cola (Post 4517138)
How can i add MX record? How can i add reverse dns ?

You don't need to if you are trying to do what I think you are trying to do.

My script would configure everything for you -- and I would be pleased to have it tested.

cola 11-06-2011 06:44 AM

Quote:

Originally Posted by catkin (Post 4517148)
Progress :)

/etc/postfix/sasl_passwd is only used for logging on to the SMTP server; it has nothing to do with the from address (unless the SMTP server is configured to force the from address to the logon address).


Most (all?) SMTP servers will not deliver such mail unless mail.mydomain.com is a DNS-resolvable domain name.


Using /etc/aliases to alias local user "user" to an email address with a public domain and then running postfix's newaliases command to process /etc/aliases.


It will be displayed in /var/log/mail.log.


You don't need to if you are trying to do what I think you are trying to do.

My script would configure everything for you -- and I would be pleased to have it tested.

I didn't use your script.

I followed this for relayhost = [smtp.gmail.com]:587 http://herson.biz/?p=94


All times are GMT -5. The time now is 07:04 AM.