~ubuntu-branches/ubuntu/oneiric/fetchmail/oneiric

« back to all changes in this revision

Viewing changes to rcfile_y.y

  • Committer: Bazaar Package Importer
  • Author(s): Artur Rona
  • Date: 2010-07-25 03:17:28 UTC
  • mfrom: (0.1.11 sid)
  • Revision ID: james.westby@ubuntu.com-20100725031728-mm78sfgx9d656h9r
Tags: 6.3.17-4ubuntu1
* Merge from Debian unstable, remaining changes: (LP: #609634)
  - debian/init, debian/fetchmail.postinst: don't stop fetchmail in
    runlevels [06], the default 'killall' handler should be sufficient
    because fetchmail writes are properly completed before telling the
    server it's ok to delete.

Show diffs side-by-side

added added

removed removed

Lines of Context:
77
77
%token NO KEEP FLUSH LIMITFLUSH FETCHALL REWRITE FORCECR STRIPCR PASS8BITS 
78
78
%token DROPSTATUS DROPDELIVERED
79
79
%token DNS SERVICE PORT UIDL INTERVAL MIMEDECODE IDLE CHECKALIAS 
80
 
%token SSL SSLKEY SSLCERT SSLPROTO SSLCERTCK SSLCERTPATH SSLCOMMONNAME SSLFINGERPRINT
 
80
%token SSL SSLKEY SSLCERT SSLPROTO SSLCERTCK SSLCERTFILE SSLCERTPATH SSLCOMMONNAME SSLFINGERPRINT
81
81
%token PRINCIPAL ESMTPNAME ESMTPPASSWORD
82
82
%token TRACEPOLLS
83
83
 
84
84
%expect 2
85
85
 
 
86
%destructor { free ($$); } STRING
 
87
 
86
88
%%
87
89
 
88
90
rcfile          : /* empty */
96
98
optmap          : MAP | /* EMPTY */;
97
99
 
98
100
/* future global options should also have the form SET <name> optmap <value> */
99
 
statement       : SET LOGFILE optmap STRING     {run.logfile = prependdir ($4, rcfiledir);}
100
 
                | SET IDFILE optmap STRING      {run.idfile = prependdir ($4, rcfiledir);}
101
 
                | SET PIDFILE optmap STRING     {run.pidfile = prependdir ($4, rcfiledir);}
 
101
statement       : SET LOGFILE optmap STRING     {run.logfile = prependdir ($4, rcfiledir); free($4);}
 
102
                | SET IDFILE optmap STRING      {run.idfile = prependdir ($4, rcfiledir); free($4);}
 
103
                | SET PIDFILE optmap STRING     {run.pidfile = prependdir ($4, rcfiledir); free($4);}
102
104
                | SET DAEMON optmap NUMBER      {run.poll_interval = $4;}
103
 
                | SET POSTMASTER optmap STRING  {run.postmaster = xstrdup($4);}
 
105
                | SET POSTMASTER optmap STRING  {run.postmaster = $4;}
104
106
                | SET BOUNCEMAIL                {run.bouncemail = TRUE;}
105
107
                | SET NO BOUNCEMAIL             {run.bouncemail = FALSE;}
106
108
                | SET SPAMBOUNCE                {run.spambounce = TRUE;}
107
109
                | SET NO SPAMBOUNCE             {run.spambounce = FALSE;}
108
110
                | SET SOFTBOUNCE                {run.softbounce = TRUE;}
109
111
                | SET NO SOFTBOUNCE             {run.softbounce = FALSE;}
110
 
                | SET PROPERTIES optmap STRING  {run.properties =xstrdup($4);}
 
112
                | SET PROPERTIES optmap STRING  {run.properties = $4;}
111
113
                | SET SYSLOG                    {run.use_syslog = TRUE;}
112
114
                | SET NO SYSLOG                 {run.use_syslog = FALSE;}
113
115
                | SET INVISIBLE                 {run.invisible = TRUE;}
129
131
                        {yyerror(GT_("server option after user options"));}
130
132
                ;
131
133
 
132
 
define_server   : POLL STRING           {reset_server($2, FALSE);}
133
 
                | SKIP STRING           {reset_server($2, TRUE);}
 
134
define_server   : POLL STRING           {reset_server($2, FALSE); free($2);}
 
135
                | SKIP STRING           {reset_server($2, TRUE);  free($2);}
134
136
                | DEFAULTS              {reset_server("defaults", FALSE);}
135
137
                ;
136
138
 
138
140
                | serverspecs serv_option
139
141
                ;
140
142
 
141
 
alias_list      : STRING                {save_str(&current.server.akalist,$1,0);}
142
 
                | alias_list STRING     {save_str(&current.server.akalist,$2,0);}
 
143
alias_list      : STRING                {save_str(&current.server.akalist,$1,0); free($1);}
 
144
                | alias_list STRING     {save_str(&current.server.akalist,$2,0); free($2);}
143
145
                ;
144
146
 
145
 
domain_list     : STRING                {save_str(&current.server.localdomains,$1,0);}
146
 
                | domain_list STRING    {save_str(&current.server.localdomains,$2,0);}
 
147
domain_list     : STRING                {save_str(&current.server.localdomains,$1,0); free($1);}
 
148
                | domain_list STRING    {save_str(&current.server.localdomains,$2,0); free($2);}
147
149
                ;
148
150
 
149
151
serv_option     : AKA alias_list
150
 
                | VIA STRING            {current.server.via = xstrdup($2);}
 
152
                | VIA STRING            {current.server.via = $2;}
151
153
                | LOCALDOMAINS domain_list
152
154
                | PROTOCOL PROTO        {current.server.protocol = $2;}
153
155
                | PROTOCOL KPOP         {
161
163
#endif /* KERBEROS_V5 */
162
164
                                            current.server.service = KPOP_PORT;
163
165
                                        }
164
 
                | PRINCIPAL STRING      {current.server.principal = xstrdup($2);}
165
 
                | ESMTPNAME STRING      {current.server.esmtp_name = xstrdup($2);}
166
 
                | ESMTPPASSWORD STRING  {current.server.esmtp_password = xstrdup($2);}
 
166
                | PRINCIPAL STRING      {current.server.principal = $2;}
 
167
                | ESMTPNAME STRING      {current.server.esmtp_name = $2;}
 
168
                | ESMTPPASSWORD STRING  {current.server.esmtp_password = $2;}
167
169
                | PROTOCOL SDPS         {
168
170
#ifdef SDPS_ENABLE
169
171
                                            current.server.protocol = P_POP3;
197
199
                        {current.server.authenticate = $2;}
198
200
                | TIMEOUT NUMBER
199
201
                        {current.server.timeout = $2;}
200
 
                | ENVELOPE NUMBER STRING 
 
202
                | ENVELOPE NUMBER STRING
201
203
                                        {
202
 
                                            current.server.envelope = 
203
 
                                                xstrdup($3);
 
204
                                            current.server.envelope = $3;
204
205
                                            current.server.envskip = $2;
205
206
                                        }
206
207
                | ENVELOPE STRING
207
208
                                        {
208
 
                                            current.server.envelope = 
209
 
                                                xstrdup($2);
 
209
                                            current.server.envelope = $2;
210
210
                                            current.server.envskip = 0;
211
211
                                        }
212
212
 
213
 
                | QVIRTUAL STRING       {current.server.qvirtual=xstrdup($2);}
 
213
                | QVIRTUAL STRING       {current.server.qvirtual = $2;}
214
214
                | INTERFACE STRING      {
215
215
#ifdef CAN_MONITOR
216
216
                                        interface_parse($2, &current.server);
217
217
#else
218
218
                                        fprintf(stderr, GT_("fetchmail: interface option is only supported under Linux (without IPv6) and FreeBSD\n"));
219
219
#endif
 
220
                                        free($2);
220
221
                                        }
221
222
                | MONITOR STRING        {
222
223
#ifdef CAN_MONITOR
223
 
                                        current.server.monitor = xstrdup($2);
 
224
                                        current.server.monitor = $2;
224
225
#else
225
226
                                        fprintf(stderr, GT_("fetchmail: monitor option is only supported under Linux (without IPv6) and FreeBSD\n"));
 
227
                                        free($2);
226
228
#endif
227
229
                                        }
228
 
                | PLUGIN STRING         { current.server.plugin = xstrdup($2); }
229
 
                | PLUGOUT STRING        { current.server.plugout = xstrdup($2); }
 
230
                | PLUGIN STRING         { current.server.plugin = $2; }
 
231
                | PLUGOUT STRING        { current.server.plugout = $2; }
230
232
                | DNS                   {current.server.dns = FLAG_TRUE;}
231
233
                | NO DNS                {current.server.dns = FLAG_FALSE;}
232
234
                | NO ENVELOPE           {current.server.envelope = STRING_DISABLED;}
247
249
explicitdef     : userdef user0opts
248
250
                ;
249
251
 
250
 
userdef         : USERNAME STRING       {current.remotename = xstrdup($2);}
 
252
userdef         : USERNAME STRING       {current.remotename = $2;}
251
253
                | USERNAME mapping_list HERE
252
 
                | USERNAME STRING THERE {current.remotename = xstrdup($2);}
 
254
                | USERNAME STRING THERE {current.remotename = $2;}
253
255
                ;
254
256
 
255
257
user0opts       : /* EMPTY */
269
271
                | mapping_list mapping
270
272
                ;
271
273
 
272
 
mapping         : STRING        
273
 
                                {save_str_pair(&current.localnames, $1, NULL);}
274
 
                | STRING MAP STRING
275
 
                                {save_str_pair(&current.localnames, $1, $3);}
276
 
                ;
277
 
 
278
 
folder_list     : STRING                {save_str(&current.mailboxes,$1,0);}
279
 
                | folder_list STRING    {save_str(&current.mailboxes,$2,0);}
280
 
                ;
281
 
 
282
 
smtp_list       : STRING                {save_str(&current.smtphunt, $1,TRUE);}
283
 
                | smtp_list STRING      {save_str(&current.smtphunt, $2,TRUE);}
284
 
                ;
285
 
 
286
 
fetch_list      : STRING                {save_str(&current.domainlist, $1,TRUE);}
287
 
                | fetch_list STRING     {save_str(&current.domainlist, $2,TRUE);}
 
274
mapping         : STRING                {save_str_pair(&current.localnames, $1, NULL); free($1);}
 
275
                | STRING MAP STRING     {save_str_pair(&current.localnames, $1, $3); free($1); free($3);}
 
276
                ;
 
277
 
 
278
folder_list     : STRING                {save_str(&current.mailboxes,$1,0); free($1);}
 
279
                | folder_list STRING    {save_str(&current.mailboxes,$2,0); free($2);}
 
280
                ;
 
281
 
 
282
smtp_list       : STRING                {save_str(&current.smtphunt, $1,TRUE); free($1);}
 
283
                | smtp_list STRING      {save_str(&current.smtphunt, $2,TRUE); free($2);}
 
284
                ;
 
285
 
 
286
fetch_list      : STRING                {save_str(&current.domainlist, $1,TRUE); free($1);}
 
287
                | fetch_list STRING     {save_str(&current.domainlist, $2,TRUE); free($2);}
288
288
                ;
289
289
 
290
290
num_list        : NUMBER
291
291
                        {
292
292
                            struct idlist *id;
293
 
                            id=save_str(&current.antispam,STRING_DUMMY,0);
 
293
                            id = save_str(&current.antispam,STRING_DUMMY,0);
294
294
                            id->val.status.num = $1;
295
295
                        }
296
296
                | num_list NUMBER
297
297
                        {
298
298
                            struct idlist *id;
299
 
                            id=save_str(&current.antispam,STRING_DUMMY,0);
 
299
                            id = save_str(&current.antispam,STRING_DUMMY,0);
300
300
                            id->val.status.num = $2;
301
301
                        }
302
302
                ;
306
306
                | IS localnames HERE
307
307
                | IS localnames
308
308
 
309
 
                | IS STRING THERE       {current.remotename  = xstrdup($2);}
310
 
                | PASSWORD STRING       {current.password    = xstrdup($2);}
 
309
                | IS STRING THERE       {current.remotename  = $2;}
 
310
                | PASSWORD STRING       {current.password    = $2;}
311
311
                | FOLDER folder_list
312
312
                | SMTPHOST smtp_list
313
313
                | FETCHDOMAINS fetch_list
314
 
                | SMTPADDRESS STRING    {current.smtpaddress = xstrdup($2);}
315
 
                | SMTPNAME STRING       {current.smtpname = xstrdup($2);}
 
314
                | SMTPADDRESS STRING    {current.smtpaddress = $2;}
 
315
                | SMTPNAME STRING       {current.smtpname =    $2;}
316
316
                | SPAMRESPONSE num_list
317
 
                | MDA STRING            {current.mda         = xstrdup($2);}
318
 
                | BSMTP STRING          {current.bsmtp       = prependdir ($2, rcfiledir);}
 
317
                | MDA STRING            {current.mda         = $2;}
 
318
                | BSMTP STRING          {current.bsmtp       = prependdir ($2, rcfiledir); free($2);}
319
319
                | LMTP                  {current.listener    = LMTP_MODE;}
320
 
                | PRECONNECT STRING     {current.preconnect  = xstrdup($2);}
321
 
                | POSTCONNECT STRING    {current.postconnect = xstrdup($2);}
 
320
                | PRECONNECT STRING     {current.preconnect  = $2;}
 
321
                | POSTCONNECT STRING    {current.postconnect = $2;}
322
322
 
323
323
                | KEEP                  {current.keep        = FLAG_TRUE;}
324
324
                | FLUSH                 {current.flush       = FLAG_TRUE;}
340
340
                    yyerror(GT_("SSL is not enabled"));
341
341
#endif 
342
342
                }
343
 
                | SSLKEY STRING         {current.sslkey = prependdir ($2, rcfiledir);}
344
 
                | SSLCERT STRING        {current.sslcert = prependdir ($2, rcfiledir);}
345
 
                | SSLPROTO STRING       {current.sslproto = xstrdup($2);}
 
343
                | SSLKEY STRING         {current.sslkey = prependdir ($2, rcfiledir); free($2);}
 
344
                | SSLCERT STRING        {current.sslcert = prependdir ($2, rcfiledir); free($2);}
 
345
                | SSLPROTO STRING       {current.sslproto = $2;}
346
346
                | SSLCERTCK             {current.sslcertck = FLAG_TRUE;}
347
 
                | SSLCERTPATH STRING    {current.sslcertpath = prependdir($2, rcfiledir);}
348
 
                | SSLCOMMONNAME STRING  {current.sslcommonname = xstrdup($2);}
349
 
                | SSLFINGERPRINT STRING {current.sslfingerprint = xstrdup($2);}
 
347
                | SSLCERTFILE STRING    {current.sslcertfile = prependdir($2, rcfiledir); free($2);}
 
348
                | SSLCERTPATH STRING    {current.sslcertpath = prependdir($2, rcfiledir); free($2);}
 
349
                | SSLCOMMONNAME STRING  {current.sslcommonname = $2;}
 
350
                | SSLFINGERPRINT STRING {current.sslfingerprint = $2;}
350
351
 
351
352
                | NO KEEP               {current.keep        = FLAG_FALSE;}
352
353
                | NO FLUSH              {current.flush       = FLAG_FALSE;}
371
372
                | BATCHLIMIT NUMBER     {current.batchlimit  = NUM_VALUE_IN($2);}
372
373
                | EXPUNGE NUMBER        {current.expunge     = NUM_VALUE_IN($2);}
373
374
 
374
 
                | PROPERTIES STRING     {current.properties  = xstrdup($2);}
 
375
                | PROPERTIES STRING     {current.properties  = $2;}
375
376
                ;
376
377
%%
377
378