HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=16)
-   -   New email accounts missing default imap folders (http://www.howtoforge.com/forums/showthread.php?t=9327)

james@thereidsonline.com 25th December 2006 01:10

New email accounts missing default imap folders
 
Hi Everyone,

I'm trying to set up courier imap on Fedora Core 5.

I *think* I have nearly got everything sorted out, but have one final problem.

When I create a new email account (using ISPConfig), the user is created successfully (ie Maildir folder is created with courierimapkeywords, cur, new and tmp folders + courierimapuiddb file), but there are no default "send" or "trash" folders, or a courierimapsubscribed file.

I can log into these accounts with Squirelmail (can only see the inbox), but I don't think I can successfully send emails.

I can manually create the folders, and the courierimapkeywords file, at which point all works fine (ie can send emails)

Can someone give me some pointers where to look?

Thanks!
James.

falko 25th December 2006 14:33

Have a look here: http://www.howtoforge.com/forums/sho...ht=maildirmake

tycho 25th December 2006 16:34

What is the content of your squirrelmail's config.php?

james@thereidsonline.com 26th December 2006 12:15

Hi Falko,

Thanks for the two replies...

I think maildirmake is a tool designed for creating shared folders (not what I wanted) - I think my problem is more of a config problem somewhere - for some reason the default folders (sent and trash) don't seem to be being created - I don't like the idea of manually creating a shared folder as a substitute!

James.

james@thereidsonline.com 26th December 2006 12:16

Hi Tycho

My Squirrelmail config.php looks like...
<?php

/**
* SquirrelMail Configuration File
* Created using the configure script, conf.pl
*/

global $version;
$config_version = '1.4.0';
$config_use_color = 2;

$org_name = "SquirrelMail";
$org_logo = SM_PATH . 'images/sm_logo.png';
$org_logo_width = '308';
$org_logo_height = '111';
$org_title = "SquirrelMail";
$signout_page = '';
$frame_top = '_top';

$provider_uri = '';

$provider_name = 'SquirrelMail';

$motd = "";

$squirrelmail_default_language = 'en_US';
$default_charset = 'iso-8859-1';
$show_alternative_names = false;
$aggressive_decoding = false;
$lossy_encoding = false;

$domain = '';
$imapServerAddress = 'localhost';
$imapPort = 143;
$useSendmail = false;
$smtpServerAddress = 'localhost';
$smtpPort = 25;
$sendmail_path = '/usr/sbin/sendmail';
$sendmail_args = '-i -t';
$pop_before_smtp = false;
$imap_server_type = 'courier';
$invert_time = false;
$optional_delimiter = '.';
$encode_header_key = '';

$default_folder_prefix = 'INBOX.';
$trash_folder = 'Trash';
$sent_folder = 'Sent';
$draft_folder = 'Drafts';
$default_move_to_trash = true;
$default_move_to_sent = true;
$default_save_as_draft = true;
$show_prefix_option = false;
$list_special_folders_first = true;
$use_special_folder_color = true;
$auto_expunge = true;
$default_sub_of_inbox = false;
$show_contain_subfolders_option = false;
$default_unseen_notify = 2;
$default_unseen_type = 1;
$auto_create_special = false;
$delete_folder = true;
$noselect_fix_enable = false;

$data_dir = SM_PATH . 'data/';
$attachment_dir = SM_PATH . 'attach/';
$dir_hash_level = 0;
$default_left_size = '150';
$force_username_lowercase = false;
$default_use_priority = true;
$hide_sm_attributions = false;
$default_use_mdn = true;
$edit_identity = true;
$edit_name = true;
$hide_auth_header = false;
$disable_thread_sort = false;
$disable_server_sort = false;
$allow_charset_search = true;
$allow_advanced_search = 0;

$time_zone_type = 0;

$plugins[] = 'compatibility';
$plugins[] = 'vlogin';

$theme_css = '';
$theme_default = 0;
$theme[0]['PATH'] = SM_PATH . 'themes/default_theme.php';
$theme[0]['NAME'] = 'Default';
$theme[1]['PATH'] = SM_PATH . 'themes/plain_blue_theme.php';
$theme[1]['NAME'] = 'Plain Blue';
$theme[2]['PATH'] = SM_PATH . 'themes/sandstorm_theme.php';
$theme[2]['NAME'] = 'Sand Storm';
$theme[3]['PATH'] = SM_PATH . 'themes/deepocean_theme.php';
$theme[3]['NAME'] = 'Deep Ocean';
$theme[4]['PATH'] = SM_PATH . 'themes/slashdot_theme.php';
$theme[4]['NAME'] = 'Slashdot';
$theme[5]['PATH'] = SM_PATH . 'themes/purple_theme.php';
$theme[5]['NAME'] = 'Purple';
$theme[6]['PATH'] = SM_PATH . 'themes/forest_theme.php';
$theme[6]['NAME'] = 'Forest';
$theme[7]['PATH'] = SM_PATH . 'themes/ice_theme.php';
$theme[7]['NAME'] = 'Ice';
$theme[8]['PATH'] = SM_PATH . 'themes/seaspray_theme.php';
$theme[8]['NAME'] = 'Sea Spray';
$theme[9]['PATH'] = SM_PATH . 'themes/bluesteel_theme.php';
$theme[9]['NAME'] = 'Blue Steel';
$theme[10]['PATH'] = SM_PATH . 'themes/dark_grey_theme.php';
$theme[10]['NAME'] = 'Dark Grey';
$theme[11]['PATH'] = SM_PATH . 'themes/high_contrast_theme.php';
$theme[11]['NAME'] = 'High Contrast';
$theme[12]['PATH'] = SM_PATH . 'themes/black_bean_burrito_theme.php';
$theme[12]['NAME'] = 'Black Bean Burrito';
$theme[13]['PATH'] = SM_PATH . 'themes/servery_theme.php';
$theme[13]['NAME'] = 'Servery';
$theme[14]['PATH'] = SM_PATH . 'themes/maize_theme.php';
$theme[14]['NAME'] = 'Maize';
$theme[15]['PATH'] = SM_PATH . 'themes/bluesnews_theme.php';
$theme[15]['NAME'] = 'BluesNews';
$theme[16]['PATH'] = SM_PATH . 'themes/deepocean2_theme.php';
$theme[16]['NAME'] = 'Deep Ocean 2';
$theme[17]['PATH'] = SM_PATH . 'themes/blue_grey_theme.php';
$theme[17]['NAME'] = 'Blue Grey';
$theme[18]['PATH'] = SM_PATH . 'themes/dompie_theme.php';
$theme[18]['NAME'] = 'Dompie';
$theme[19]['PATH'] = SM_PATH . 'themes/methodical_theme.php';
$theme[19]['NAME'] = 'Methodical';
$theme[20]['PATH'] = SM_PATH . 'themes/greenhouse_effect.php';
$theme[20]['NAME'] = 'Greenhouse Effect (Changes)';
$theme[21]['PATH'] = SM_PATH . 'themes/in_the_pink.php';
$theme[21]['NAME'] = 'In The Pink (Changes)';
$theme[22]['PATH'] = SM_PATH . 'themes/kind_of_blue.php';
$theme[22]['NAME'] = 'Kind of Blue (Changes)';
$theme[23]['PATH'] = SM_PATH . 'themes/monostochastic.php';
$theme[23]['NAME'] = 'Monostochastic (Changes)';
$theme[24]['PATH'] = SM_PATH . 'themes/shades_of_grey.php';
$theme[24]['NAME'] = 'Shades of Grey (Changes)';
$theme[25]['PATH'] = SM_PATH . 'themes/spice_of_life.php';
$theme[25]['NAME'] = 'Spice of Life (Changes)';
$theme[26]['PATH'] = SM_PATH . 'themes/spice_of_life_lite.php';
$theme[26]['NAME'] = 'Spice of Life - Lite (Changes)';
$theme[27]['PATH'] = SM_PATH . 'themes/spice_of_life_dark.php';
$theme[27]['NAME'] = 'Spice of Life - Dark (Changes)';
$theme[28]['PATH'] = SM_PATH . 'themes/christmas.php';
$theme[28]['NAME'] = 'Holiday - Christmas';
$theme[29]['PATH'] = SM_PATH . 'themes/darkness.php';
$theme[29]['NAME'] = 'Darkness (Changes)';
$theme[30]['PATH'] = SM_PATH . 'themes/random.php';
$theme[30]['NAME'] = 'Random (Changes every login)';
$theme[31]['PATH'] = SM_PATH . 'themes/midnight.php';
$theme[31]['NAME'] = 'Midnight';
$theme[32]['PATH'] = SM_PATH . 'themes/alien_glow.php';
$theme[32]['NAME'] = 'Alien Glow';
$theme[33]['PATH'] = SM_PATH . 'themes/dark_green.php';
$theme[33]['NAME'] = 'Dark Green';
$theme[34]['PATH'] = SM_PATH . 'themes/penguin.php';
$theme[34]['NAME'] = 'Penguin';
$theme[35]['PATH'] = SM_PATH . 'themes/minimal_bw.php';
$theme[35]['NAME'] = 'Minimal BW';
$theme[36]['PATH'] = SM_PATH . 'themes/redmond.php';
$theme[36]['NAME'] = 'Redmond';
$theme[37]['PATH'] = SM_PATH . 'themes/netstyle_theme.php';
$theme[37]['NAME'] = 'Net Style';
$theme[38]['PATH'] = SM_PATH . 'themes/silver_steel_theme.php';
$theme[38]['NAME'] = 'Silver Steel';
$theme[39]['PATH'] = SM_PATH . 'themes/simple_green_theme.php';
$theme[39]['NAME'] = 'Simple Green';
$theme[40]['PATH'] = SM_PATH . 'themes/wood_theme.php';
$theme[40]['NAME'] = 'Wood';
$theme[41]['PATH'] = SM_PATH . 'themes/bluesome.php';
$theme[41]['NAME'] = 'Bluesome';
$theme[42]['PATH'] = SM_PATH . 'themes/simple_green2.php';
$theme[42]['NAME'] = 'Simple Green 2';
$theme[43]['PATH'] = SM_PATH . 'themes/simple_purple.php';
$theme[43]['NAME'] = 'Simple Purple';

$templateset_default = 0;
$aTemplateSet[0]['PATH'] = SM_PATH . 'templates/default/';
$aTemplateSet[0]['NAME'] = 'Default template';

$default_fontsize = '';
$default_fontset = '';

$fontsets = array();
$fontsets['serif'] = 'serif';
$fontsets['sans'] = 'helvetica,arial,sans-serif';
$fontsets['comicsans'] = 'comic sans ms,sans-serif';
$fontsets['verasans'] = 'bitstream vera sans,verdana,sans-serif';
$fontsets['tahoma'] = 'tahoma,sans-serif';

$default_use_javascript_addr_book = false;
$addrbook_dsn = '';
$addrbook_table = 'address';

$prefs_dsn = '';
$prefs_table = 'userprefs';
$prefs_user_field = 'user';
$prefs_user_size = 128;
$prefs_key_field = 'prefkey';
$prefs_key_size = 64;
$prefs_val_field = 'prefval';
$prefs_val_size = 65536;

$addrbook_global_dsn = '';
$addrbook_global_table = 'global_abook';
$addrbook_global_writeable = false;
$addrbook_global_listing = false;

$abook_global_file = '';
$abook_global_file_writeable = false;

$abook_global_file_listing = true;

$no_list_for_subscribe = false;
$smtp_auth_mech = 'none';
$imap_auth_mech = 'login';
$use_imap_tls = 2;
$use_smtp_tls = 0;
$session_name = 'SQMSESSID';

$advanced_tree = false;

$use_iframe = false;

$use_icons = false;

$use_php_recode = false;

$use_php_iconv = false;

$allow_remote_configtest = true;

@include SM_PATH . 'config/config_local.php';

/**
* Make sure there are no characters after the PHP closing
* tag below (including newline characters and whitespace).
* Otherwise, that character will cause the headers to be
* sent and regular output to begin, which will majorly screw
* things up when we try to send more headers later.
*/
?>
My copy of Squirrelmail was installed using the ISPConfig Squrrelmail package, and modified with conf.pl to use the default Courier settings.

James.

james@thereidsonline.com 26th December 2006 12:18

Can someone give me some ideas on which program is responsible for creating the default folders? I get the impression that when a new email account is created that the send and trash folders are not created at this time - it is left to the first imap client that logs in to do this (eg Squirrelmail or Outlook etc) - is this correct? Are these folders created regardless of whether it is the first time that the account has been logged into?

My maillog has the following in it when I try to log in:
Dec 26 20:04:20 uksys01 imapd: Connection, ip=[::ffff:127.0.0.1]
Dec 26 20:04:20 uksys01 authdaemond: received auth request, service=imap, authtype=login
Dec 26 20:04:20 uksys01 authdaemond: authuserdb: trying this module
Dec 26 20:04:20 uksys01 authdaemond: userdb: opened /etc/authlib/userdb.dat
Dec 26 20:04:20 uksys01 authdaemond: userdb: looking up 'thereidsonline.com_test7'
Dec 26 20:04:20 uksys01 authdaemond: userdb: home=/var/www/web3/user/thereidsonline.com_test7, uid=10014, gid=10003, shell=/bin/false, mail=/var/www/web3/user/thereidsonline.com_test7/Maildir, quota=<unset>, gecos=test7, options=<unset>
Dec 26 20:04:20 uksys01 authdaemond: found systempw in userdbshadow
Dec 26 20:04:20 uksys01 authdaemond: authuserdb: sysusername=<null>, sysuserid=10014, sysgroupid=10003, homedir=/var/www/web3/user/thereidsonline.com_test7, address=thereidsonline.com_test7, fullname=test7, maildir=/var/www/web3/user/thereidsonline.com_test7/Maildir, quota=<null>, options=<null>
Dec 26 20:04:20 uksys01 authdaemond: password matches successfully
Dec 26 20:04:20 uksys01 authdaemond: Authenticated: sysusername=<null>, sysuserid=10014, sysgroupid=10003, homedir=/var/www/web3/user/thereidsonline.com_test7, address=thereidsonline.com_test7, fullname=test7, maildir=/var/www/web3/user/thereidsonline.com_test7/Maildir, quota=<null>, options=<null>
Dec 26 20:04:20 uksys01 imapd: LOGIN, user=thereidsonline.com_test7, ip=[::ffff:127.0.0.1], protocol=IMAP
Dec 26 20:04:20 uksys01 imapd: LOGOUT, user=thereidsonline.com_test7, ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=113, sent=261, time=0, starttls=1
Note: I've tried to implement the mod that allows me to log in using user@domain
Is it somehow possible that although courier imap is authenticating my email login successfuly that in reality it does not have access to the Maildir folder, and that as a result it cannot access the "Inbox"? (though I would have expected to see an error in the log if this were the case).

Thanks for your help,
James.

tycho 26th December 2006 12:25

OK, set
$auto_create_special = false; to
$auto_create_special = true;
I also reccomend setting
$show_contain_subfolders_option = false; to
$show_contain_subfolders_option = true;

Now reload apache.

This should solve your problem.

tycho 26th December 2006 12:48

Quote:

Originally Posted by james@thereidsonline.com
Can someone give me some ideas on which program is responsible for creating the default folders?

I think you mean trash, sent and drafts?
They are created because some mailclient is ordering to do so (so in your case probably squirrelmail). The folders and their structures are created and maintained by courier, but luckily courier does not autocreate anything.
Subsequently your mail client can order courier to create, modifie and delete all other folders you wish to handle.
By the way, the inbox and initial structures are created when the first message arrives.

james@thereidsonline.com 27th December 2006 11:34

Hi Tycho,

Thanks for your quick reply - Squirellmail is now working correctly!

However....

I now have a new problem.

I don't seem to be able to receive emails correctly.

When Postfix receives an email, it says (maillog):
Dec 27 09:12:25 uksys01 postfix/smtpd[20719]: connect from omta04ps.mx.bigpond.com[144.140.83.156]
Dec 27 09:12:25 uksys01 postfix/smtpd[20719]: 61C571E90726: client=omta04ps.mx.bigpond.com[144.140.83.156]
Dec 27 09:12:25 uksys01 postfix/cleanup[20723]: 61C571E90726: message-id=<003301c7293a$e78f5200$6665a8c0@laptop01>
Dec 27 09:12:25 uksys01 postfix/qmgr[7939]: 61C571E90726: from=<jean@thereidsonline.com>, size=2556, nrcpt=1 (queue active)
Dec 27 09:12:25 uksys01 postfix/smtpd[20719]: disconnect from omta04ps.mx.bigpond.com[144.140.83.156]
Dec 27 09:12:26 uksys01 postfix/smtp[20724]: 61C571E90726: to=<reidware.net_james@mail01.uk.reidware.net>, orig_to=<james@reidware.net>, relay=192.168.201.40[192.168.201.40], delay=1, status=sent (250 Ok: queued as 0C16FA5624)
Dec 27 09:12:26 uksys01 postfix/qmgr[7939]: 61C571E90726: removed
From this I interpret that an email was successfully received from the Internet, and that Postfix *thinks* that it has been deposited into the appropriate mailbox correctly.

However, the email never reaches the mailbox.

I'm trying to use Maildir, but I think I might have accidently started to use something else (I think the Courier IMAP module that I installed possibly also included a Maildrop module too)

My main.cf looks like:
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
mail_owner = postfix
myhostname = mail01.uk.reidware.net
inet_interfaces = all
unknown_local_recipient_reject_code = 550
mynetworks = 192.168.101.0/24, 192.168.201.0/24, 192.168.100.0/24, 127.0.0.0/8
relayhost = [192.168.201.40]
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
debug_peer_level = 2
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
xxgdb $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.2.8/samples
readme_directory = /usr/share/doc/postfix-2.2.8/README_FILES
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject _unauth_destination
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtpd_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
virtual_maps = hash:/etc/postfix/virtusertable
mydestination = /etc/postfix/local-host-names
My Master.cf looks like:
#
# Postfix master process configuration file. For details on the format
# of the file, see the Postfix master(5) manual page.
#
# ================================================== ========================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ================================================== ========================
smtp inet n - n - - smtpd
#submission inet n - n - - smtpd
# -o smtpd_etrn_restrictions=reject
# -o smtpd_client_restrictions=permit_sasl_authenticate d,reject
#smtps inet n - n - - smtpd
# -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
#submission inet n - n - - smtpd
# -o smtpd_etrn_restrictions=reject
# -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes
#628 inet n - n - - qmqpd
pickup fifo n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr fifo n - n 300 1 oqmgr
tlsmgr unix - - n 1000? 1 tlsmgr
rewrite unix - - n - - trivial-rewrite
bounce unix - - n - 0 bounce
defer unix - - n - 0 bounce
trace unix - - n - 0 bounce
verify unix - - n - 1 verify
flush unix n - n 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - n - - smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay unix - - n - - smtp
-o fallback_relay=
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - n - - showq
error unix - - n - - error
discard unix - - n - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
scache unix - - n - 1 scache
#
# ================================================== ==================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent. See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ================================================== ==================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}

# used to be --> flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
#
# The Cyrus deliver program has changed incompatibly, multiple times.
#
old-cyrus unix - n n - - pipe
flags=R user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -m ${extension} ${user}
# Cyrus 2.1.5 (Amos Gouaux)
# Also specify in main.cf: cyrus_destination_recipient_limit=1
cyrus unix - n n - - pipe
user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -r ${sender} -m ${extension} ${user}
#
# See the Postfix UUCP_README file for configuration details.
#
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# Other external delivery methods.
#
ifmail unix - n n - - pipe
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
Can you give me some pointers on what needs to be fixed here to get things back to normal?

Thanks!
James.

till 27th December 2006 12:52

Your server is forwarding the email to the relayserver instead of handling it locally.

Is the domain of the email address (i guess its reidware.net ?) listed in the file /etc/postfix/local-host-names ? Have you enabled the maildir checkbox in ISPConfig under management > server > settings?


All times are GMT +2. The time now is 20:44.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.