Setting-up mail service in Vagrant VM

22 views
Skip to first unread message

Alex Popescu

unread,
Aug 13, 2021, 6:22:25 AM8/13/21
to Alaveteli Dev
Hello,
I've finally managed to have Alaveteli running – via Vagrant. 
What would be the next step to make emails running?
It doesn't seem clear from the documentation there would be a next step for this so I'd hoped it would work out of the box – after editing the config.

Do I need to follow some of the steps laid out here: https://alaveteli.org/docs/installing/email/
Am I correct in understanding that I can/should set-up a POP server which has a superuser account that would grant Alaveteli rights to create new mailboxes as per each request?

Thank you,
Alex

Alex Popescu

unread,
Aug 15, 2021, 6:25:04 PM8/15/21
to Alaveteli Dev
I figured out Postfix IS running.
Is there anything to be edited in general.yml for email to start working? Here is my general.yml (with comments stripped) https://pastebin.com/RWFYzyUU 
are all the emails listed with @localhost and @alaveteli.10.10.10.30.nip.io automatically created?

looking at /var/log/mail/mail.log I see 'Connection timed out' for external domains:

Aug 15 21:41:51 alaveteli-buster64 postfix/smtp[13928]: connect to ASPMX.L.GOOGLE.COM[173.194.69.27]:25: Connection timed out
Aug 15 21:41:51 alaveteli-buster64 postfix/smtp[13928]: connect to ASPMX.L.GOOGLE.COM[2a00:1450:4013:c16::1b]:25: Network is unreachable
Aug 15 21:41:51 alaveteli-buster64 postfix/smtp[13928]: AA77C103E29: to=<x...@yyy.zz>, relay=none, delay=30, delays=0.01/0.01/30/0, dsn=4.4.1, status=deferred (connect to ASPMX.L.GOOGLE.COM[2a00:1450:4013:c16::1b]:25: Network is unreachable)
....
Aug 15 21:49:18 alaveteli-buster64 postfix/smtp[14245]: connect to mail.mailinator.com[23.239.11.30]:25: Connection timed out
Aug 15 21:49:18 alaveteli-buster64 postfix/smtp[14242]: DF38D100707: to=<testal...@mailinator.com>, relay=none, delay=346653, delays=346593/0.02/60/0, dsn=4.4.1, status=deferred (connect to mail.mailinator.com[23.239.11.30]:25: Connection timed out)
...
Aug 15 22:18:48 alaveteli-buster64 postfix/smtp[14593]: 64A79103E2B: to=<alav...@guerrillamail.info>, relay=none, delay=1106, delays=1076/0.02/30/0, dsn=4.4.1, status=deferred (connect to guerrillamail.info[168.119.142.36]:25: Connection timed out)
Aug 15 22:18:48 alaveteli-buster64 postfix/smtp[14592]: connect to mail2.mailinator.com[45.33.83.75]:25: Connection timed out
Aug 15 22:19:10 alaveteli-buster64 postfix/smtp[14587]: connect to mta6.am0.yahoodns.net[67.195.204.74]:25: Connection timed out
Aug 15 22:19:40 alaveteli-buster64 postfix/smtp[14587]: B0019103E49: to=<z...@yahoo.com>, relay=none, delay=150, delays=0.04/0.03/150/0, dsn=4.4.1, status=deferred (connect to mta5.am0.yahoodns.net[67.195.204.72]:25: Connection timed out)
...
Aug 15 22:20:01 alaveteli-buster64 postfix/pickup[14278]: BE508104BAA: uid=1000 from=<vagrant>
Aug 15 22:20:01 alaveteli-buster64 postfix/cleanup[14617]: BE508104BAA: message-id=<2021081522200...@alaveteli.10.10.10.30.nip.io>
Aug 15 22:20:01 alaveteli-buster64 postfix/qmgr[6294]: BE508104BAA: from=<vag...@alaveteli.10.10.10.30.nip.io>, size=1304, nrcpt=1 (queue active)
Aug 15 22:20:01 alaveteli-buster64 postfix/pickup[14278]: BF49D103E4D: uid=1000 from=<vagrant>
Aug 15 22:20:01 alaveteli-buster64 postfix/cleanup[14617]: BF49D103E4D: message-id=<2021081522200...@alaveteli.10.10.10.30.nip.io>
Aug 15 22:20:01 alaveteli-buster64 postfix/qmgr[6294]: BF49D103E4D: from=<vag...@alaveteli.10.10.10.30.nip.io>, size=1377, nrcpt=1 (queue active)
Aug 15 22:20:01 alaveteli-buster64 postfix/local[14618]: BE508104BAA: to=<ro...@alaveteli.10.10.10.30.nip.io>, relay=local, delay=0.02, delays=0.01/0.01/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
Aug 15 22:20:01 alaveteli-buster64 postfix/qmgr[6294]: BE508104BAA: removed
Aug 15 22:20:01 alaveteli-buster64 postfix/local[14618]: BF49D103E4D: to=<ro...@alaveteli.10.10.10.30.nip.io>, relay=local, delay=0.02, delays=0.02/0.01/0/0, dsn=2.0.0, status=sent (delivered to mailbox)

Alex Popescu

unread,
Aug 16, 2021, 6:45:48 AM8/16/21
to Alaveteli Dev
I also ran the test command:
bundle exec rake spec
as per https://alaveteli.org/docs/installing/manual_install/#troubleshooting 

I got:
0 examples, 0 failures, 440 errors occurred outside of examples

with a list of code-level errors

Alex Popescu

unread,
Aug 16, 2021, 6:52:46 AM8/16/21
to Alaveteli Dev
> with a list of code-level errors

forgot to attach the log generated by bundle exec rake spec
https://drive.google.com/file/d/1GJLVyqYk7jnf5bKT1CzP9W5U3CWffC_J/view?usp=sharing 

Gareth Rees

unread,
Aug 16, 2021, 10:39:14 AM8/16/21
to Alaveteli Dev
> I've finally managed to have Alaveteli running – via Vagrant. 

Excellent work! It's worth noting that we don't recommend Vagrant for a production install, but it's good for testing Alaveteli and getting used to the platform.

> What would be the next step to make emails running? Do I need to follow some of the steps laid out here: https://alaveteli.org/docs/installing/email/

Yes, this describes how to handle sending and receiving email with Alaveteli.

> Set-up a POP server

At this point, I wouldn't worry about a POP mailbox. This is only a requirement for Alaveteli Pro (https://alaveteli.org/docs/pro/)

> I see 'Connection timed out' for external domains:

The Vagrant setup is for development, so isn't suitable for external email.

You'll want to use real domain names with all the associated DNS setup (A and MX records) and the associated email best practices (https://alaveteli.org/docs/running/server/#email-configuration).

> I also ran the test command bundle exec rake spec … with a list of code-level errors

From the log it looks like the test database hasn't had its schema loaded. Run `RAILS_ENV=test bundle exec rake db:migrate`. We've added this to the automated install scripts for future versions of Alaveteli [1].

Best,

Gareth

Reply all
Reply to author
Forward
0 new messages