Category Archives: Linux

dovecot: lda(root): Error: user root: Initialization failed: Namespace ”: stat(/root/Maildir) failed: Permission denied

 

Apr 29 14:37:45 sd-71796 dovecot: lda(root): Error: user root: Initialization failed: Namespace ”: stat(/root/Maildir) failed: Permission denied (euid=65534(nobody) egid=65534(nogroup) missing +x perm: /root, dir owned by 0:0 mode=0700)

OK!

I’v created an aliase…

Edit /etc/postfix/virtual

nano /etc/postfix/virtual

Add the entry

[email protected]    existing_user

Rebuild postmap

sudo postmap /etc/postfix/virtual

 

 

Sources

Ubuntu postfix+dovecot – Create default Inbox, Sent, and Trash folder per account

 

Open /etc/dovecot/conf.d/20-imap.conf

sudo nano /etc/dovecot/conf.d/20-imap.conf

Search for mail_plugins and make the following changes on that line

from
mail_plugins = $mail_plugins
to 
mail_plugins = $mail_plugins autocreate

Then add the following at the end of the file

plugin {
     autocreate = Trash
     autocreate2 = Junk
     autocreate3 = Drafts
     autocreate4 = Sent
     autosubscribe = Trash
     autosubscribe2 = Junk
     autosubscribe3 = Drafts
     autosubscribe4 = Sent
}

Restart dovecot

sudo service dovecot restart

 

More readings

 

Apr 29 03:09:02 sd-71796 postfix/master[43779]: fatal: bind 0.0.0.0 port 25: Address already in use

Apr 29 03:09:02 sd-71796 postfix/master[43779]: fatal: bind 0.0.0.0 port 25: Address already in use

So, looks like we have the port 25 in use!

This solved my issue…
service sendmail stop
service postfix restart
service sendmail start

After doing this the /var/mail/ had the user’s files!

Send a test email

mail -s "Test Subject" [email protected] < /dev/null

To set up an user you need to Configure Additional Email Addresses.

 

Solution found at http://askubuntu.com/questions/405058/postfix-start-error-port-25-address-already-in-use

 

How to reset MySQL root password

Step 1: Stop MySQL Service.

sudo stop mysql

Step 2: Kill all running mysqld.

sudo killall -9 mysqld

Step 3: Starting mysqld in Safe mode.

sudo mysqld_safe --skip-grant-tables --skip-networking &

Step 4: Start mysql client

mysql -u root

Step 5: After successful login, please execute this command to change any password.

FLUSH PRIVILEGES;

Step 6: You can update mysql root password .

UPDATE mysql.user SET Password=PASSWORD('newpwd') WHERE User='root';

Step 7: Please execute this command.

FLUSH PRIVILEGES;

Gently copied from http://askubuntu.com/questions/489098/unable-to-reset-root-password-of-mysql

Original solution from http://www.dbrnd.com/2015/08/reset-mysql-root-password-ubuntu/

mysqldump > unknown table engine ‘PERFORMANCE_SCHEMA’

Lets simply force mysqldump to ignore all performance_schema tables.

# mysqldump -u <username> -p <password> --all-databases > /root/mysql.full.dump --ignore-table=performance_schema.cond_instances --ignore-table=performance_schema.events_waits_current --ignore-table=performance_schema.cond_instances --ignore-table=performance_schema.events_waits_history --ignore-table=performance_schema.events_waits_history_long  --ignore-table=performance_schema.events_waits_summary_by_instance --ignore-table=performance_schema.events_waits_summary_by_thread_by_event_name --ignore-table=performance_schema.events_waits_summary_global_by_event_name --ignore-table=performance_schema.file_instances --ignore-table=performance_schema.file_summary_by_event_name  --ignore-table=performance_schema.file_summary_by_instance  --ignore-table=performance_schema.mutex_instances --ignore-table=performance_schema.performance_timers  --ignore-table=performance_schema.rwlock_instances --ignore-table=performance_schema.setup_consumers --ignore-table=performance_schema.setup_instruments --ignore-table=performance_schema.setup_timers --ignore-table=performance_schema.threads

But remember!
An error is always an error!
This solution isn’t 100% recommended!

mysql – Can’t create/write to file ‘/tmp/

 

root@colo18:~# mysqldump -u root --all-databases > colo18.sql
mysqldump: Couldn't execute 'show fields from `crongal`': Can't create/write to file '/tmp/#sql_b8c_0.MYI' (Errcode: 13) (1)

Lets set the proper permissions to /temp

sudo chmod 1777 /tmp

It will solve the issue.

Resources:

SSL tutorials

Just bought a SSL certificate for one of my clients….
Here are some useful tutorial links.—

CSR Generation: Using OpenSSL (Apache w/mod_ssl, NGINX, OS X)
https://support.comodo.com/index.php?/Default/Knowledgebase/Article/View/1/66/

Nginx CSR Generation using OpenSSL
https://support.comodo.com/index.php?/Default/Knowledgebase/Article/View/801/0/nginx-csr-generation-using-openssl

Certificate Installation: Apache & mod_ssl
https://support.comodo.com/index.php?/Default/Knowledgebase/Article/View/637/66/

Certificate Installation : NGINX
https://support.comodo.com/index.php?/Default/Knowledgebase/Article/View/1091/0/certificate-installation–nginx