How do I create a local mail account?

Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
I want to create a local mail account suitable for apt-listchanges. In other words, local services will send mail to local@localhost (?) and I should be able to check that mailbox using a regular mail client (Thunderbird, Geany...)
This would preferably be a "system" account rather than a "user" account, but if userland apps can't access that, a "user" account will do.
debian email exim
add a comment |Â
up vote
2
down vote
favorite
I want to create a local mail account suitable for apt-listchanges. In other words, local services will send mail to local@localhost (?) and I should be able to check that mailbox using a regular mail client (Thunderbird, Geany...)
This would preferably be a "system" account rather than a "user" account, but if userland apps can't access that, a "user" account will do.
debian email exim
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I want to create a local mail account suitable for apt-listchanges. In other words, local services will send mail to local@localhost (?) and I should be able to check that mailbox using a regular mail client (Thunderbird, Geany...)
This would preferably be a "system" account rather than a "user" account, but if userland apps can't access that, a "user" account will do.
debian email exim
I want to create a local mail account suitable for apt-listchanges. In other words, local services will send mail to local@localhost (?) and I should be able to check that mailbox using a regular mail client (Thunderbird, Geany...)
This would preferably be a "system" account rather than a "user" account, but if userland apps can't access that, a "user" account will do.
debian email exim
edited Feb 28 at 11:20
asked Feb 27 at 16:00
d3vid
741427
741427
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
1
down vote
I'm not sure I understand what you mean by system and user
accounts but if you're asking how to handle local e-mail on Linux
it's quite simple. I don't use Ubuntu on the daily basis but I've
just run the following in the virtual machine:
$ sudo apt-get install sendmail
sendmail is the name of the SMTP server that will deliver e-mails.
$ sudo apt-get install mutt
mutt is the name of the Mail User Agent that we'll use to read mail.
Make sure that sendmail is running:
$ ps aux | grep '[s]endmail'
root 31687 0.0 0.1 108964 5408 ? Ss 19:24 0:00 sendmail: MTA: accepting connections
Send a test e-mail to yourself:
$ sendmail -i $(whoami) <<MAIL_END
> Subject: test e-mail
>
> HELLO
> MAIL_END
Note that after pressing Enter you get:
You have new mail in /var/mail/<USERNAME>
Use mutt to read mail, for example:
$ mutt -f /var/mail/ja
Actually, when using mutt you don't even have to use -f:
$ mutt
is enough as mutt will try to open $MAIL. In Ubuntu it's defined by default:
$ echo $MAIL
/var/mail/ja
add a comment |Â
up vote
0
down vote
On a Debian-based system you should already have exim4 which provides the sendmail utility. Configure it as follows:
1. Confirm FQDN
exim4 requires a "fully qualified" domain name for your local machine, which just means it needs a dot in it. Confirm this with the following:
$ hostname
$ hostname --fqdn
These will return your machine name and your FQDN. By default your FQDN is exactly the same as your machine name and does not contain a dot, and you need to change it.
(If it is different and contains a dot, skip step 2.)
2. Modify hosts file
We will now set your FQDN. To do this modify your hosts file:
sudo nano /etc/hosts
You should see the following lines in the file (gaps are tabs):
127.0.0.1 localhost
127.0.1.1 HOSTNAME
change this to...
127.0.0.1 localhost
127.0.1.1 mail.localhost HOSTNAME
...then save and exit. Repeat step one to confirm that your hostname remains the same, and your FQDN has been updated.
3. Configure exim4
Configure exim4 as follows:
sudo dpkg-reconfigure exim4-config
In the questions that follow select the following options (and otherwise select the defaults):
- "local delivery only; not on a network"
- System mail name: "mail.localhost"
- Other destinations for which mail is accepted: "mail.localhost"
- Keep number of DNS queries minimal? Yes
- Delivery method: mbox format in /var/mail
- Where to send
rootandpostmastermail:USERNAME@localhost- Now system messages will be sent to your user account and you don't need special permissions to access them
4. Test
To test, you can send a local email with mail USERNAME@localhost. Fill in the prompts as follows
$ mail USERNAME@localhost
Cc: <leave blank, hit enter>
Subject: test subject
test body <hit enter>
<hit Ctrl-D>
You can confirm the message has been received by typing mail. Hit Q to quit the text-based mail client.
5. Configure MUA GUI
Now configure your preferred GUI client for mbox access, and check that your test message also appears in your inbox there.
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
I'm not sure I understand what you mean by system and user
accounts but if you're asking how to handle local e-mail on Linux
it's quite simple. I don't use Ubuntu on the daily basis but I've
just run the following in the virtual machine:
$ sudo apt-get install sendmail
sendmail is the name of the SMTP server that will deliver e-mails.
$ sudo apt-get install mutt
mutt is the name of the Mail User Agent that we'll use to read mail.
Make sure that sendmail is running:
$ ps aux | grep '[s]endmail'
root 31687 0.0 0.1 108964 5408 ? Ss 19:24 0:00 sendmail: MTA: accepting connections
Send a test e-mail to yourself:
$ sendmail -i $(whoami) <<MAIL_END
> Subject: test e-mail
>
> HELLO
> MAIL_END
Note that after pressing Enter you get:
You have new mail in /var/mail/<USERNAME>
Use mutt to read mail, for example:
$ mutt -f /var/mail/ja
Actually, when using mutt you don't even have to use -f:
$ mutt
is enough as mutt will try to open $MAIL. In Ubuntu it's defined by default:
$ echo $MAIL
/var/mail/ja
add a comment |Â
up vote
1
down vote
I'm not sure I understand what you mean by system and user
accounts but if you're asking how to handle local e-mail on Linux
it's quite simple. I don't use Ubuntu on the daily basis but I've
just run the following in the virtual machine:
$ sudo apt-get install sendmail
sendmail is the name of the SMTP server that will deliver e-mails.
$ sudo apt-get install mutt
mutt is the name of the Mail User Agent that we'll use to read mail.
Make sure that sendmail is running:
$ ps aux | grep '[s]endmail'
root 31687 0.0 0.1 108964 5408 ? Ss 19:24 0:00 sendmail: MTA: accepting connections
Send a test e-mail to yourself:
$ sendmail -i $(whoami) <<MAIL_END
> Subject: test e-mail
>
> HELLO
> MAIL_END
Note that after pressing Enter you get:
You have new mail in /var/mail/<USERNAME>
Use mutt to read mail, for example:
$ mutt -f /var/mail/ja
Actually, when using mutt you don't even have to use -f:
$ mutt
is enough as mutt will try to open $MAIL. In Ubuntu it's defined by default:
$ echo $MAIL
/var/mail/ja
add a comment |Â
up vote
1
down vote
up vote
1
down vote
I'm not sure I understand what you mean by system and user
accounts but if you're asking how to handle local e-mail on Linux
it's quite simple. I don't use Ubuntu on the daily basis but I've
just run the following in the virtual machine:
$ sudo apt-get install sendmail
sendmail is the name of the SMTP server that will deliver e-mails.
$ sudo apt-get install mutt
mutt is the name of the Mail User Agent that we'll use to read mail.
Make sure that sendmail is running:
$ ps aux | grep '[s]endmail'
root 31687 0.0 0.1 108964 5408 ? Ss 19:24 0:00 sendmail: MTA: accepting connections
Send a test e-mail to yourself:
$ sendmail -i $(whoami) <<MAIL_END
> Subject: test e-mail
>
> HELLO
> MAIL_END
Note that after pressing Enter you get:
You have new mail in /var/mail/<USERNAME>
Use mutt to read mail, for example:
$ mutt -f /var/mail/ja
Actually, when using mutt you don't even have to use -f:
$ mutt
is enough as mutt will try to open $MAIL. In Ubuntu it's defined by default:
$ echo $MAIL
/var/mail/ja
I'm not sure I understand what you mean by system and user
accounts but if you're asking how to handle local e-mail on Linux
it's quite simple. I don't use Ubuntu on the daily basis but I've
just run the following in the virtual machine:
$ sudo apt-get install sendmail
sendmail is the name of the SMTP server that will deliver e-mails.
$ sudo apt-get install mutt
mutt is the name of the Mail User Agent that we'll use to read mail.
Make sure that sendmail is running:
$ ps aux | grep '[s]endmail'
root 31687 0.0 0.1 108964 5408 ? Ss 19:24 0:00 sendmail: MTA: accepting connections
Send a test e-mail to yourself:
$ sendmail -i $(whoami) <<MAIL_END
> Subject: test e-mail
>
> HELLO
> MAIL_END
Note that after pressing Enter you get:
You have new mail in /var/mail/<USERNAME>
Use mutt to read mail, for example:
$ mutt -f /var/mail/ja
Actually, when using mutt you don't even have to use -f:
$ mutt
is enough as mutt will try to open $MAIL. In Ubuntu it's defined by default:
$ echo $MAIL
/var/mail/ja
edited Feb 27 at 20:42
answered Feb 27 at 18:33
Arkadiusz Drabczyk
7,18521532
7,18521532
add a comment |Â
add a comment |Â
up vote
0
down vote
On a Debian-based system you should already have exim4 which provides the sendmail utility. Configure it as follows:
1. Confirm FQDN
exim4 requires a "fully qualified" domain name for your local machine, which just means it needs a dot in it. Confirm this with the following:
$ hostname
$ hostname --fqdn
These will return your machine name and your FQDN. By default your FQDN is exactly the same as your machine name and does not contain a dot, and you need to change it.
(If it is different and contains a dot, skip step 2.)
2. Modify hosts file
We will now set your FQDN. To do this modify your hosts file:
sudo nano /etc/hosts
You should see the following lines in the file (gaps are tabs):
127.0.0.1 localhost
127.0.1.1 HOSTNAME
change this to...
127.0.0.1 localhost
127.0.1.1 mail.localhost HOSTNAME
...then save and exit. Repeat step one to confirm that your hostname remains the same, and your FQDN has been updated.
3. Configure exim4
Configure exim4 as follows:
sudo dpkg-reconfigure exim4-config
In the questions that follow select the following options (and otherwise select the defaults):
- "local delivery only; not on a network"
- System mail name: "mail.localhost"
- Other destinations for which mail is accepted: "mail.localhost"
- Keep number of DNS queries minimal? Yes
- Delivery method: mbox format in /var/mail
- Where to send
rootandpostmastermail:USERNAME@localhost- Now system messages will be sent to your user account and you don't need special permissions to access them
4. Test
To test, you can send a local email with mail USERNAME@localhost. Fill in the prompts as follows
$ mail USERNAME@localhost
Cc: <leave blank, hit enter>
Subject: test subject
test body <hit enter>
<hit Ctrl-D>
You can confirm the message has been received by typing mail. Hit Q to quit the text-based mail client.
5. Configure MUA GUI
Now configure your preferred GUI client for mbox access, and check that your test message also appears in your inbox there.
add a comment |Â
up vote
0
down vote
On a Debian-based system you should already have exim4 which provides the sendmail utility. Configure it as follows:
1. Confirm FQDN
exim4 requires a "fully qualified" domain name for your local machine, which just means it needs a dot in it. Confirm this with the following:
$ hostname
$ hostname --fqdn
These will return your machine name and your FQDN. By default your FQDN is exactly the same as your machine name and does not contain a dot, and you need to change it.
(If it is different and contains a dot, skip step 2.)
2. Modify hosts file
We will now set your FQDN. To do this modify your hosts file:
sudo nano /etc/hosts
You should see the following lines in the file (gaps are tabs):
127.0.0.1 localhost
127.0.1.1 HOSTNAME
change this to...
127.0.0.1 localhost
127.0.1.1 mail.localhost HOSTNAME
...then save and exit. Repeat step one to confirm that your hostname remains the same, and your FQDN has been updated.
3. Configure exim4
Configure exim4 as follows:
sudo dpkg-reconfigure exim4-config
In the questions that follow select the following options (and otherwise select the defaults):
- "local delivery only; not on a network"
- System mail name: "mail.localhost"
- Other destinations for which mail is accepted: "mail.localhost"
- Keep number of DNS queries minimal? Yes
- Delivery method: mbox format in /var/mail
- Where to send
rootandpostmastermail:USERNAME@localhost- Now system messages will be sent to your user account and you don't need special permissions to access them
4. Test
To test, you can send a local email with mail USERNAME@localhost. Fill in the prompts as follows
$ mail USERNAME@localhost
Cc: <leave blank, hit enter>
Subject: test subject
test body <hit enter>
<hit Ctrl-D>
You can confirm the message has been received by typing mail. Hit Q to quit the text-based mail client.
5. Configure MUA GUI
Now configure your preferred GUI client for mbox access, and check that your test message also appears in your inbox there.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
On a Debian-based system you should already have exim4 which provides the sendmail utility. Configure it as follows:
1. Confirm FQDN
exim4 requires a "fully qualified" domain name for your local machine, which just means it needs a dot in it. Confirm this with the following:
$ hostname
$ hostname --fqdn
These will return your machine name and your FQDN. By default your FQDN is exactly the same as your machine name and does not contain a dot, and you need to change it.
(If it is different and contains a dot, skip step 2.)
2. Modify hosts file
We will now set your FQDN. To do this modify your hosts file:
sudo nano /etc/hosts
You should see the following lines in the file (gaps are tabs):
127.0.0.1 localhost
127.0.1.1 HOSTNAME
change this to...
127.0.0.1 localhost
127.0.1.1 mail.localhost HOSTNAME
...then save and exit. Repeat step one to confirm that your hostname remains the same, and your FQDN has been updated.
3. Configure exim4
Configure exim4 as follows:
sudo dpkg-reconfigure exim4-config
In the questions that follow select the following options (and otherwise select the defaults):
- "local delivery only; not on a network"
- System mail name: "mail.localhost"
- Other destinations for which mail is accepted: "mail.localhost"
- Keep number of DNS queries minimal? Yes
- Delivery method: mbox format in /var/mail
- Where to send
rootandpostmastermail:USERNAME@localhost- Now system messages will be sent to your user account and you don't need special permissions to access them
4. Test
To test, you can send a local email with mail USERNAME@localhost. Fill in the prompts as follows
$ mail USERNAME@localhost
Cc: <leave blank, hit enter>
Subject: test subject
test body <hit enter>
<hit Ctrl-D>
You can confirm the message has been received by typing mail. Hit Q to quit the text-based mail client.
5. Configure MUA GUI
Now configure your preferred GUI client for mbox access, and check that your test message also appears in your inbox there.
On a Debian-based system you should already have exim4 which provides the sendmail utility. Configure it as follows:
1. Confirm FQDN
exim4 requires a "fully qualified" domain name for your local machine, which just means it needs a dot in it. Confirm this with the following:
$ hostname
$ hostname --fqdn
These will return your machine name and your FQDN. By default your FQDN is exactly the same as your machine name and does not contain a dot, and you need to change it.
(If it is different and contains a dot, skip step 2.)
2. Modify hosts file
We will now set your FQDN. To do this modify your hosts file:
sudo nano /etc/hosts
You should see the following lines in the file (gaps are tabs):
127.0.0.1 localhost
127.0.1.1 HOSTNAME
change this to...
127.0.0.1 localhost
127.0.1.1 mail.localhost HOSTNAME
...then save and exit. Repeat step one to confirm that your hostname remains the same, and your FQDN has been updated.
3. Configure exim4
Configure exim4 as follows:
sudo dpkg-reconfigure exim4-config
In the questions that follow select the following options (and otherwise select the defaults):
- "local delivery only; not on a network"
- System mail name: "mail.localhost"
- Other destinations for which mail is accepted: "mail.localhost"
- Keep number of DNS queries minimal? Yes
- Delivery method: mbox format in /var/mail
- Where to send
rootandpostmastermail:USERNAME@localhost- Now system messages will be sent to your user account and you don't need special permissions to access them
4. Test
To test, you can send a local email with mail USERNAME@localhost. Fill in the prompts as follows
$ mail USERNAME@localhost
Cc: <leave blank, hit enter>
Subject: test subject
test body <hit enter>
<hit Ctrl-D>
You can confirm the message has been received by typing mail. Hit Q to quit the text-based mail client.
5. Configure MUA GUI
Now configure your preferred GUI client for mbox access, and check that your test message also appears in your inbox there.
answered Feb 28 at 11:19
d3vid
741427
741427
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f426963%2fhow-do-i-create-a-local-mail-account%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password