// kafka-connector options: START
[[camel-imap-kafka-connector-source]]
= camel-imap-kafka-connector source configuration

When using camel-imap-kafka-connector as source make sure to use the following Maven dependency to have support for the connector:

[source,xml]
----
<dependency>
  <groupId>org.apache.camel.kafkaconnector</groupId>
  <artifactId>camel-imap-kafka-connector</artifactId>
  <version>x.x.x</version>
  <!-- use the same version as your Camel Kafka connector version -->
</dependency>
----

To use this Source connector in Kafka connect you'll need to set the following connector.class

[source,java]
----
connector.class=org.apache.camel.kafkaconnector.imap.CamelImapSourceConnector
----


The camel-imap source connector supports 95 options, which are listed below.



[width="100%",cols="2,5,^1,1,1",options="header"]
|===
| Name | Description | Default | Required | Priority
| *camel.source.path.host* | The mail server host name | null | true | HIGH
| *camel.source.path.port* | The port number of the mail server | null | false | MEDIUM
| *camel.source.endpoint.bridgeErrorHandler* | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | false | MEDIUM
| *camel.source.endpoint.closeFolder* | Whether the consumer should close the folder after polling. Setting this option to false and having disconnect=false as well, then the consumer keep the folder open between polls. | true | false | MEDIUM
| *camel.source.endpoint.copyTo* | After processing a mail message, it can be copied to a mail folder with the given name. You can override this configuration value, with a header with the key copyTo, allowing you to copy messages to folder names configured at runtime. | null | false | MEDIUM
| *camel.source.endpoint.delete* | Deletes the messages after they have been processed. This is done by setting the DELETED flag on the mail message. If false, the SEEN flag is set instead. As of Camel 2.10 you can override this configuration option by setting a header with the key delete to determine if the mail should be deleted or not. | false | false | MEDIUM
| *camel.source.endpoint.disconnect* | Whether the consumer should disconnect after polling. If enabled this forces Camel to connect on each poll. | false | false | MEDIUM
| *camel.source.endpoint.handleFailedMessage* | If the mail consumer cannot retrieve a given mail message, then this option allows to handle the caused exception by the consumer's error handler. By enable the bridge error handler on the consumer, then the Camel routing error handler can handle the exception instead. The default behavior would be the consumer throws an exception and no mails from the batch would be able to be routed by Camel. | false | false | MEDIUM
| *camel.source.endpoint.maxMessagesPerPoll* | Specifies the maximum number of messages to gather per poll. By default, no maximum is set. Can be used to set a limit of e.g. 1000 to avoid downloading thousands of files when the server starts up. Set a value of 0 or negative to disable this option. | null | false | MEDIUM
| *camel.source.endpoint.mimeDecodeHeaders* | This option enables transparent MIME decoding and unfolding for mail headers. | false | false | MEDIUM
| *camel.source.endpoint.moveTo* | After processing a mail message, it can be moved to a mail folder with the given name. You can override this configuration value, with a header with the key moveTo, allowing you to move messages to folder names configured at runtime. | null | false | MEDIUM
| *camel.source.endpoint.peek* | Will mark the javax.mail.Message as peeked before processing the mail message. This applies to IMAPMessage messages types only. By using peek the mail will not be eager marked as SEEN on the mail server, which allows us to rollback the mail message if there is an error processing in Camel. | true | false | MEDIUM
| *camel.source.endpoint.sendEmptyMessageWhenIdle* | If the polling consumer did not poll any files, you can enable this option to send an empty message (no body) instead. | false | false | MEDIUM
| *camel.source.endpoint.skipFailedMessage* | If the mail consumer cannot retrieve a given mail message, then this option allows to skip the message and move on to retrieve the next mail message. The default behavior would be the consumer throws an exception and no mails from the batch would be able to be routed by Camel. | false | false | MEDIUM
| *camel.source.endpoint.unseen* | Whether to limit by unseen mails only. | true | false | MEDIUM
| *camel.source.endpoint.exceptionHandler* | To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored. | null | false | MEDIUM
| *camel.source.endpoint.exchangePattern* | Sets the exchange pattern when the consumer creates an exchange. One of: [InOnly] [InOut] [InOptionalOut] | null | false | MEDIUM
| *camel.source.endpoint.fetchSize* | Sets the maximum number of messages to consume during a poll. This can be used to avoid overloading a mail server, if a mailbox folder contains a lot of messages. Default value of -1 means no fetch size and all messages will be consumed. Setting the value to 0 is a special corner case, where Camel will not consume any messages at all. | -1 | false | MEDIUM
| *camel.source.endpoint.folderName* | The folder to poll. | "INBOX" | false | MEDIUM
| *camel.source.endpoint.mailUidGenerator* | A pluggable MailUidGenerator that allows to use custom logic to generate UUID of the mail message. | null | false | MEDIUM
| *camel.source.endpoint.mapMailMessage* | Specifies whether Camel should map the received mail message to Camel body/headers/attachments. If set to true, the body of the mail message is mapped to the body of the Camel IN message, the mail headers are mapped to IN headers, and the attachments to Camel IN attachment message. If this option is set to false then the IN message contains a raw javax.mail.Message. You can retrieve this raw message by calling exchange.getIn().getBody(javax.mail.Message.class). | true | false | MEDIUM
| *camel.source.endpoint.pollStrategy* | A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom implementation to control error handling usually occurred during the poll operation before an Exchange have been created and being routed in Camel. | null | false | MEDIUM
| *camel.source.endpoint.postProcessAction* | Refers to an MailBoxPostProcessAction for doing post processing tasks on the mailbox once the normal processing ended. | null | false | MEDIUM
| *camel.source.endpoint.additionalJavaMailProperties* | Sets additional java mail properties, that will append/override any default properties that is set based on all the other options. This is useful if you need to add some special options but want to keep the others as is. | null | false | MEDIUM
| *camel.source.endpoint.alternativeBodyHeader* | Specifies the key to an IN message header that contains an alternative email body. For example, if you send emails in text/html format and want to provide an alternative mail body for non-HTML email clients, set the alternative mail body with this key as a header. | "CamelMailAlternativeBody" | false | MEDIUM
| *camel.source.endpoint.attachmentsContentTransfer EncodingResolver* | To use a custom AttachmentsContentTransferEncodingResolver to resolve what content-type-encoding to use for attachments. | null | false | MEDIUM
| *camel.source.endpoint.authenticator* | The authenticator for login. If set then the password and username are ignored. Can be used for tokens which can expire and therefore must be read dynamically. | null | false | MEDIUM
| *camel.source.endpoint.basicPropertyBinding* | Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | false | MEDIUM
| *camel.source.endpoint.binding* | Sets the binding used to convert from a Camel message to and from a Mail message | null | false | MEDIUM
| *camel.source.endpoint.connectionTimeout* | The connection timeout in milliseconds. | 30000 | false | MEDIUM
| *camel.source.endpoint.contentType* | The mail message content type. Use text/html for HTML mails. | "text/plain" | false | MEDIUM
| *camel.source.endpoint.contentTypeResolver* | Resolver to determine Content-Type for file attachments. | null | false | MEDIUM
| *camel.source.endpoint.debugMode* | Enable debug mode on the underlying mail framework. The SUN Mail framework logs the debug messages to System.out by default. | false | false | MEDIUM
| *camel.source.endpoint.headerFilterStrategy* | To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter headers. | null | false | MEDIUM
| *camel.source.endpoint.ignoreUnsupportedCharset* | Option to let Camel ignore unsupported charset in the local JVM when sending mails. If the charset is unsupported then charset=XXX (where XXX represents the unsupported charset) is removed from the content-type and it relies on the platform default instead. | false | false | MEDIUM
| *camel.source.endpoint.ignoreUriScheme* | Option to let Camel ignore unsupported charset in the local JVM when sending mails. If the charset is unsupported then charset=XXX (where XXX represents the unsupported charset) is removed from the content-type and it relies on the platform default instead. | false | false | MEDIUM
| *camel.source.endpoint.javaMailProperties* | Sets the java mail options. Will clear any default properties and only use the properties provided for this method. | null | false | MEDIUM
| *camel.source.endpoint.session* | Specifies the mail session that camel should use for all mail interactions. Useful in scenarios where mail sessions are created and managed by some other resource, such as a JavaEE container. When using a custom mail session, then the hostname and port from the mail session will be used (if configured on the session). | null | false | MEDIUM
| *camel.source.endpoint.synchronous* | Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). | false | false | MEDIUM
| *camel.source.endpoint.useInlineAttachments* | Whether to use disposition inline or attachment. | false | false | MEDIUM
| *camel.source.endpoint.idempotentRepository* | A pluggable repository org.apache.camel.spi.IdempotentRepository which allows to cluster consuming from the same mailbox, and let the repository coordinate whether a mail message is valid for the consumer to process. By default no repository is in use. | null | false | MEDIUM
| *camel.source.endpoint.idempotentRepositoryRemoveOn Commit* | When using idempotent repository, then when the mail message has been successfully processed and is committed, should the message id be removed from the idempotent repository (default) or be kept in the repository. By default its assumed the message id is unique and has no value to be kept in the repository, because the mail message will be marked as seen/moved or deleted to prevent it from being consumed again. And therefore having the message id stored in the idempotent repository has little value. However this option allows to store the message id, for whatever reason you may have. | true | false | MEDIUM
| *camel.source.endpoint.searchTerm* | Refers to a javax.mail.search.SearchTerm which allows to filter mails based on search criteria such as subject, body, from, sent after a certain date etc. | null | false | MEDIUM
| *camel.source.endpoint.backoffErrorThreshold* | The number of subsequent error polls (failed due some error) that should happen before the backoffMultipler should kick-in. | null | false | MEDIUM
| *camel.source.endpoint.backoffIdleThreshold* | The number of subsequent idle polls that should happen before the backoffMultipler should kick-in. | null | false | MEDIUM
| *camel.source.endpoint.backoffMultiplier* | To let the scheduled polling consumer backoff if there has been a number of subsequent idles/errors in a row. The multiplier is then the number of polls that will be skipped before the next actual attempt is happening again. When this option is in use then backoffIdleThreshold and/or backoffErrorThreshold must also be configured. | null | false | MEDIUM
| *camel.source.endpoint.delay* | Milliseconds before the next poll. | 60000L | false | MEDIUM
| *camel.source.endpoint.greedy* | If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the previous run polled 1 or more messages. | false | false | MEDIUM
| *camel.source.endpoint.initialDelay* | Milliseconds before the first poll starts. | 1000L | false | MEDIUM
| *camel.source.endpoint.repeatCount* | Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only fire once. If you set it to 5, it will only fire five times. A value of zero or negative means fire forever. | 0L | false | MEDIUM
| *camel.source.endpoint.runLoggingLevel* | The consumer logs a start/complete log line when it polls. This option allows you to configure the logging level for that. One of: [TRACE] [DEBUG] [INFO] [WARN] [ERROR] [OFF] | "TRACE" | false | MEDIUM
| *camel.source.endpoint.scheduledExecutorService* | Allows for configuring a custom/shared thread pool to use for the consumer. By default each consumer has its own single threaded thread pool. | null | false | MEDIUM
| *camel.source.endpoint.scheduler* | To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or quartz for built in scheduler | "none" | false | MEDIUM
| *camel.source.endpoint.schedulerProperties* | To configure additional properties when using a custom scheduler or any of the Quartz, Spring based scheduler. | null | false | MEDIUM
| *camel.source.endpoint.startScheduler* | Whether the scheduler should be auto started. | true | false | MEDIUM
| *camel.source.endpoint.timeUnit* | Time unit for initialDelay and delay options. One of: [NANOSECONDS] [MICROSECONDS] [MILLISECONDS] [SECONDS] [MINUTES] [HOURS] [DAYS] | "MILLISECONDS" | false | MEDIUM
| *camel.source.endpoint.useFixedDelay* | Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. | true | false | MEDIUM
| *camel.source.endpoint.password* | The password for login. See also setAuthenticator(MailAuthenticator). | null | false | MEDIUM
| *camel.source.endpoint.sslContextParameters* | To configure security using SSLContextParameters. | null | false | MEDIUM
| *camel.source.endpoint.username* | The username for login. See also setAuthenticator(MailAuthenticator). | null | false | MEDIUM
| *camel.source.endpoint.sortTerm* | Sorting order for messages. Only natively supported for IMAP. Emulated to some degree when using POP3 or when IMAP server does not have the SORT capability. | null | false | MEDIUM
| *camel.component.imap.bridgeErrorHandler* | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | false | MEDIUM
| *camel.component.imap.closeFolder* | Whether the consumer should close the folder after polling. Setting this option to false and having disconnect=false as well, then the consumer keep the folder open between polls. | true | false | MEDIUM
| *camel.component.imap.copyTo* | After processing a mail message, it can be copied to a mail folder with the given name. You can override this configuration value, with a header with the key copyTo, allowing you to copy messages to folder names configured at runtime. | null | false | MEDIUM
| *camel.component.imap.delete* | Deletes the messages after they have been processed. This is done by setting the DELETED flag on the mail message. If false, the SEEN flag is set instead. As of Camel 2.10 you can override this configuration option by setting a header with the key delete to determine if the mail should be deleted or not. | false | false | MEDIUM
| *camel.component.imap.disconnect* | Whether the consumer should disconnect after polling. If enabled this forces Camel to connect on each poll. | false | false | MEDIUM
| *camel.component.imap.handleFailedMessage* | If the mail consumer cannot retrieve a given mail message, then this option allows to handle the caused exception by the consumer's error handler. By enable the bridge error handler on the consumer, then the Camel routing error handler can handle the exception instead. The default behavior would be the consumer throws an exception and no mails from the batch would be able to be routed by Camel. | false | false | MEDIUM
| *camel.component.imap.mimeDecodeHeaders* | This option enables transparent MIME decoding and unfolding for mail headers. | false | false | MEDIUM
| *camel.component.imap.moveTo* | After processing a mail message, it can be moved to a mail folder with the given name. You can override this configuration value, with a header with the key moveTo, allowing you to move messages to folder names configured at runtime. | null | false | MEDIUM
| *camel.component.imap.peek* | Will mark the javax.mail.Message as peeked before processing the mail message. This applies to IMAPMessage messages types only. By using peek the mail will not be eager marked as SEEN on the mail server, which allows us to rollback the mail message if there is an error processing in Camel. | true | false | MEDIUM
| *camel.component.imap.skipFailedMessage* | If the mail consumer cannot retrieve a given mail message, then this option allows to skip the message and move on to retrieve the next mail message. The default behavior would be the consumer throws an exception and no mails from the batch would be able to be routed by Camel. | false | false | MEDIUM
| *camel.component.imap.unseen* | Whether to limit by unseen mails only. | true | false | MEDIUM
| *camel.component.imap.fetchSize* | Sets the maximum number of messages to consume during a poll. This can be used to avoid overloading a mail server, if a mailbox folder contains a lot of messages. Default value of -1 means no fetch size and all messages will be consumed. Setting the value to 0 is a special corner case, where Camel will not consume any messages at all. | -1 | false | MEDIUM
| *camel.component.imap.folderName* | The folder to poll. | "INBOX" | false | MEDIUM
| *camel.component.imap.mapMailMessage* | Specifies whether Camel should map the received mail message to Camel body/headers/attachments. If set to true, the body of the mail message is mapped to the body of the Camel IN message, the mail headers are mapped to IN headers, and the attachments to Camel IN attachment message. If this option is set to false then the IN message contains a raw javax.mail.Message. You can retrieve this raw message by calling exchange.getIn().getBody(javax.mail.Message.class). | true | false | MEDIUM
| *camel.component.imap.additionalJavaMailProperties* | Sets additional java mail properties, that will append/override any default properties that is set based on all the other options. This is useful if you need to add some special options but want to keep the others as is. | null | false | MEDIUM
| *camel.component.imap.alternativeBodyHeader* | Specifies the key to an IN message header that contains an alternative email body. For example, if you send emails in text/html format and want to provide an alternative mail body for non-HTML email clients, set the alternative mail body with this key as a header. | "CamelMailAlternativeBody" | false | MEDIUM
| *camel.component.imap.attachmentsContentTransfer EncodingResolver* | To use a custom AttachmentsContentTransferEncodingResolver to resolve what content-type-encoding to use for attachments. | null | false | MEDIUM
| *camel.component.imap.authenticator* | The authenticator for login. If set then the password and username are ignored. Can be used for tokens which can expire and therefore must be read dynamically. | null | false | MEDIUM
| *camel.component.imap.basicPropertyBinding* | Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | false | LOW
| *camel.component.imap.configuration* | Sets the Mail configuration | null | false | MEDIUM
| *camel.component.imap.connectionTimeout* | The connection timeout in milliseconds. | 30000 | false | MEDIUM
| *camel.component.imap.contentType* | The mail message content type. Use text/html for HTML mails. | "text/plain" | false | MEDIUM
| *camel.component.imap.contentTypeResolver* | Resolver to determine Content-Type for file attachments. | null | false | MEDIUM
| *camel.component.imap.debugMode* | Enable debug mode on the underlying mail framework. The SUN Mail framework logs the debug messages to System.out by default. | false | false | MEDIUM
| *camel.component.imap.ignoreUnsupportedCharset* | Option to let Camel ignore unsupported charset in the local JVM when sending mails. If the charset is unsupported then charset=XXX (where XXX represents the unsupported charset) is removed from the content-type and it relies on the platform default instead. | false | false | MEDIUM
| *camel.component.imap.ignoreUriScheme* | Option to let Camel ignore unsupported charset in the local JVM when sending mails. If the charset is unsupported then charset=XXX (where XXX represents the unsupported charset) is removed from the content-type and it relies on the platform default instead. | false | false | MEDIUM
| *camel.component.imap.javaMailProperties* | Sets the java mail options. Will clear any default properties and only use the properties provided for this method. | null | false | MEDIUM
| *camel.component.imap.session* | Specifies the mail session that camel should use for all mail interactions. Useful in scenarios where mail sessions are created and managed by some other resource, such as a JavaEE container. When using a custom mail session, then the hostname and port from the mail session will be used (if configured on the session). | null | false | MEDIUM
| *camel.component.imap.useInlineAttachments* | Whether to use disposition inline or attachment. | false | false | MEDIUM
| *camel.component.imap.headerFilterStrategy* | To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter header to and from Camel message. | null | false | MEDIUM
| *camel.component.imap.password* | The password for login. See also setAuthenticator(MailAuthenticator). | null | false | MEDIUM
| *camel.component.imap.sslContextParameters* | To configure security using SSLContextParameters. | null | false | MEDIUM
| *camel.component.imap.useGlobalSslContextParameters* | Enable usage of global SSL context parameters. | false | false | MEDIUM
| *camel.component.imap.username* | The username for login. See also setAuthenticator(MailAuthenticator). | null | false | MEDIUM
|===



The camel-imap sink connector has no converters out of the box.





The camel-imap sink connector has no transforms out of the box.





The camel-imap sink connector has no aggregation strategies out of the box.
// kafka-connector options: END
