Author: varkoly Date: Wed Apr 7 14:52:02 2010 New Revision: 61601 URL: http://svn.opensuse.org/viewcvs/yast?rev=61601&view=rev Log: Initial version of daemonles postfix solution Add missed requierments for subpacakage Modified: trunk/mail/src/Mail.ycp trunk/mail/src/mail.ycp trunk/mail/src/ui.ycp trunk/mail/yast2-mail.spec.in Modified: trunk/mail/src/Mail.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/mail/src/Mail.ycp?rev=61601&r1=61600&r2=61601&view=diff ============================================================================== --- trunk/mail/src/Mail.ycp (original) +++ trunk/mail/src/Mail.ycp Wed Apr 7 14:52:02 2010 @@ -237,6 +237,16 @@ boolean amavis_service = true; /** + * The cron file name for the queue checking. + */ + global string cron_file = "/etc/cron.d/novell.postfix-check-mail-queue"; + + /** + * The cron interval for the queue checking. + */ + global integer check_interval = 15; + + /** * Detect which packages have to be installed * and return a descriptive string for a plain text pop-up. * @return "" or "Foo will be installed.\nBar will be installed.\n" @@ -391,6 +401,7 @@ // connection_type: boolean nc = false; boolean ex = false; + boolean nd = false; // the service must be always running //boolean service = false; if (mta == `sendmail) @@ -400,14 +411,19 @@ } else if (mta == `postfix) { - nc = SCR::Read (.sysconfig.postfix.POSTFIX_NODNS) == "yes"; - ex = SCR::Read (.sysconfig.postfix.POSTFIX_DIALUP) == "yes"; + nc = SCR::Read (.sysconfig.postfix.POSTFIX_NODNS) == "yes"; + ex = SCR::Read (.sysconfig.postfix.POSTFIX_DIALUP) == "yes"; + nd = SCR::Read (.sysconfig.postfix.POSTFIX_NODAEMON) == "yes"; } else { return false; } - if (nc) + if (nd) + { + connection_type = `nodaemon; + } + else if (nc) { connection_type = (ex)? `dialup : `none; } @@ -718,7 +734,13 @@ return false; } - if (connection_type == `permanent) + if (connection_type == `nodaemon) + { + SCR::Write (.sysconfig.postfix.POSTFIX_NODAEMON, "yes"); + SCR::Write (nc_nd, "yes"); + SCR::Write (ex_di, "no"); + } + else if (connection_type == `permanent) { SCR::Write (nc_nd, "no"); SCR::Write (ex_di, "no"); @@ -738,13 +760,22 @@ y2internal("Unrecognized connection_type: %1", connection_type); return false; } - Service::Enable (service); - + if (connection_type == `nodaemon) + { + Service::Disable (service); + SCR::Write (.sysconfig.amavis.USE_AMAVIS, "no"); + SCR::Write (.target.string,cron_file,"-*/"+check_interval+" * * * * root /usr/sbin/check_mail_queue &>/dev/null"); + } + else + { + SCR::Execute (.target.bash,"test -e "+cron_file+" && rm "+cron_file+";"); + Service::Enable (service); + Service::Adjust ("amavis", use_amavis? "enable":"disable"); + } // amavis SCR::Write (.sysconfig.amavis.USE_AMAVIS, use_amavis? "yes":"no"); // used also in WriteServices amavis_service = true; - Service::Adjust ("amavis", use_amavis? "enable":"disable"); // SENDMAIL_ARGS // by default they contain -q30m, not good for dial-up Modified: trunk/mail/src/mail.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/mail/src/mail.ycp?rev=61601&r1=61600&r2=61601&view=diff ============================================================================== --- trunk/mail/src/mail.ycp (original) +++ trunk/mail/src/mail.ycp Wed Apr 7 14:52:02 2010 @@ -18,16 +18,6 @@ * */ -/** - * @param flag "<b>permanent</b>", "<b>dialup</b>", or "<b>screenshots</b>"<br> - * <dl> - * <dt>permanent<dd>preselects permanent connnection - * <dt>dialup<dd>preselects dial-up connnection - * <dt>screenshots - * <dd>uses faked data (see Mail::Fake), enables running the module - * as non-root. (Uses Mode::screen_shot().) - * </dl> - */ { /*** * <h3>Configuration of the mail</h3> Modified: trunk/mail/src/ui.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/mail/src/ui.ycp?rev=61601&r1=61600&r2=61601&view=diff ============================================================================== --- trunk/mail/src/ui.ycp (original) +++ trunk/mail/src/ui.ycp Wed Apr 7 14:52:02 2010 @@ -251,6 +251,8 @@ `RadioButton (`id (`dialup), `opt (`notify), _("&Dial-up"), ct == `dialup), // Translators: radio button label `RadioButton (`id (`none), `opt (`notify), _("No &connection"), ct == `none), + // Translators: radio button label + `RadioButton (`id (`nodaemon), `opt (`notify), _("Do not start Postfix as Daemon"), ct == `nodaemon), ] ) ); @@ -292,6 +294,11 @@ //argh, slow //Wizard::RestoreNextButton (); } + else if (ct == `nodaemon) + { + UI::ChangeWidget (`id (`use_amavis), `Value, false); + UI::ChangeWidget (`id (`use_amavis), `Enabled, false); + } else if (ct == `none) { UI::ChangeWidget (`id (`use_amavis), `Value, false); Modified: trunk/mail/yast2-mail.spec.in URL: http://svn.opensuse.org/viewcvs/yast/trunk/mail/yast2-mail.spec.in?rev=61601&r1=61600&r2=61601&view=diff ============================================================================== --- trunk/mail/yast2-mail.spec.in (original) +++ trunk/mail/yast2-mail.spec.in Wed Apr 7 14:52:02 2010 @@ -36,7 +36,7 @@ %package plugins Summary: YaST2 - Users/Group Plugins for the mail delivery configuration Group: System/YaST -Requires: perl-NetxAP +Requires: perl-NetxAP acl %description plugins Plugins for the YaST2 users modul for enterprise mail server -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org