2

I am trying to see if there is any way I can send email from external email address to Unix user account. I don't know if this at all possible or not.

For example, if my external email address is [email protected] and unix user name is test@localhost on testserver.test.com then I would like send email from [email protected] to test@localhost.

With mail command I know I can send email from Unix to my account on Gmail/Outlook but I would to know if any way exists to do reverse. Ultimately I want to have it available in /var/spool/mail/test account.

1
  • If you have some mail server, such as dovecot running on testserver.test.com, just send mail from [email protected] to [email protected]. Commented Dec 17, 2013 at 18:43

1 Answer 1

5

To do this you need to have your server 'known' to the internet so that the rest of the world (including google mail) knows where to push your emails. And then run an MTA on your server (like postfix) that the outside world can connect to, to deliver the email. The MTA is then responsible for delivering to the the spool directory.

I am pretty sure that requires a fixed IP address where your server can be reached, and a server that is online most of the time.

If this is only for a single account, it is much easier to create a special email account somewhere (e.g. gmail) and pick up that email with a cron job that call fetchmail and delivers to the local MTA. This does not require a fixed IP for the server, nor that the port for the MTA (25) on the server is reachable from the outside world.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.